Re: insert file?

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

 



Frank Cox wrote:
> On Wed, 28 Nov 2007 23:26:25 +0800 (CST)
> adrian kok <adriankok2000@xxxxxxxxxxxx> wrote:
> 
>> Please help how insert `who` in the third line of the
>> file 
> 
> man sed
> 
I think he wanted to insert the output of the who command in the
file. It that is the case, then it gets a bit more complicated,
because you are trying to insert multiple lines.

You could do something like:

who | sed -i -e2r/dev/stdin <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