Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^5: Combining files

by vitoco (Friar)
on Oct 02, 2009 at 15:10 UTC ( #798876=note: print w/replies, xml ) Need Help??


in reply to Re^4: Combining files
in thread Combining files

Use pipe "|" instead of ">" to pass data from one program to another:

type * | perl -ne "print unless /^Total\s\d{1,5}/" > ..\newFile

Using only Perl:

perl -e "while (<*>) {open(F,$_) or next;while(<F>){print unless /^Tot +al\s\d{1,5}/}}" > ..\newFile

Note: this code has errors, but works as an example.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://798876]
help
Chatterbox?
Corion had a meeting with some startup today. They have a very interesting DB proxy product, but their tech stack is really, really weird. They use the Pg wire protocol but not the Pg libraries to handle it. They support Pg SQL syntax, but don't use ...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2018-04-19 12:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?