Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Read contents of multiple files into new file and then move source files?

by jdrago999 (Pilgrim)
on Feb 10, 2012 at 19:42 UTC ( #953107=note: print w/replies, xml ) Need Help??


in reply to Read contents of multiple files into new file and then move source files?

cat /files/* > new-file.txt && mv /files/* /new-folder/

Ahh but you're on Windows...

  • Comment on Re: Read contents of multiple files into new file and then move source files?
  • Download Code

Replies are listed 'Best First'.
Re^2: Read contents of multiple files into new file and then move source files?
by aaron_baugher (Curate) on Feb 10, 2012 at 23:20 UTC

    Wondering: Is it possible for a file to be created after the first wildcard is interpreted, but before the second, so a file would get moved that wasn't catted?

    Aside from being on Windows, he's also talking about thousands of files, so a shell might balk at that many anyway. That'd lead to using find, which done right should eliminate any concerns about moving unprocessed files.

    Aaron B.
    My Woefully Neglected Blog, where I occasionally mention Perl.

      Yes, yes, and yes.

      You get my ++ upvote across the board. My reply was hasty and without caffeine.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://953107]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2020-05-31 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?