Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 ( [id://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...

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://953107]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-03-29 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found