Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Combine files with same extension in new file -- oneliner

by Discipulus (Canon)
on Oct 01, 2015 at 09:20 UTC ( [id://1143498]=note: print w/replies, xml ) Need Help??


in reply to Combine files with same extension in new file

perl is too fun!
>cat one.lox header dat1 dat2 > > >cat two.lox header dat3 dat4 > > >perl -lne "BEGIN { @ARGV = map glob, @ARGV; } if ($. > 1){print} cl +ose ARGV if eof;" *.lox > outfile.log<P> > > >cat outfile.log dat1 dat2 dat3 dat4<P>

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Combine files with same extension in new file -- oneliner
by holli (Abbot) on Jul 17, 2019 at 14:45 UTC
    What about the header?


    holli

    You can lead your users to water, but alas, you cannot drown them.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-23 23:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found