Re: insert file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alan Cox wrote:
>> head -n 3 file;who;tail -n $(echo "$(wc -l file | cut -d " " -f 1) -3" |bc) file
> 
> ( head -n3 file; who; tail +3 file) > newfile 2> errors
> 
> Much easier ;)
> 
I think you need to change "tail +3" to "tail -n +3" or tail will
treat +3 as a file name.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux