concating files together
D at vid lacravate
lacravate at mongueurs.net
Fri May 23 09:08:54 CDT 2003
Hi ,
En ce jour du Fri, 23 May 2003 14:46:27 +0100,
Boyle Bernadette <B.Boyle at gcal.ac.uk> parlait ainsi :
> Can anyone tell me id there is a Perl command to concat files into one.
> more /var/log/maillog* > /tmp/output
I am not namely from Belfast so i hope my answering to you won't be seen as some st(om|ep)ping in ...
Now for your question :
It depends what you want to do ... Is it in a script , and then you don't need to be concise , or is it from the command line and then :
perl -ne'open W,"outputfile";print W $_ for @ARGV;close W;' file1 file2 file3...
Would probably do...
HTH.
--
D at vid lacravate
lacravate at mongueurs.net
tresorier at mongueurs.net
Assistez à la prochaine conférence Perl en France
23-25 juillet 2003 au CNAM (PARIS)
http://yapc.mongueurs.net
More information about the Belfast-pm
mailing list