The simplest way is to use grep - or specifically the fgrep version

fgrep -H "" file1 file2 file3


the -H shows the file name at the start of the line
the "" means match on null so return all lines.



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 20 June 2007 05:47
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Unix cat help

Outstanding!!!  Thanks very much to you, Adrian, Rodney, John, and Stewart.



-------------- Original message -------------- 
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> 

> Stewart Leicester wrote: 
> 
> > perl -lne 'print "$ARGV*$_"' file1 file2 | sort -t* -k2,99 
> > newfile 
> 
> Or just do it in awk: 
> 
> awk '{printf("%s*%s\n",FILENAME,$0)}' file1 file2 | sort -t* 
> -k2,999 
> 
> Gotta say I was surprised that the '*' delimeter in the sort 
> command didn't need to be escaped with \, but it doesn't. 
> 
> Cheers, 
> 
> Ken 
> ------- 
> u2-users mailing list 
> u2-users@listserver.u2ug.org 
> To unsubscribe please visit http://listserver.u2ug.org/ 
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to