[plug] Insert one file into another

Ben New ben at leftclick.com.au
Mon Dec 8 17:20:53 WST 2003


Yeah I just re-read the man page and it seems the '-e' option does 
basically nothing when there's only one of them. Not sure if there's any 
difference between the three versions below, in terms of efficiency. I'm 
sure with a few tests on 10MB files it would become pretty obvious 
pretty quickly if one was better than the others ;-)

<shrug-back />

Ben


James Devenish wrote:

>In message <3FD43784.6070600 at leftclick.com.au>
>on Mon, Dec 08, 2003 at 04:34:12PM +0800, Ben New wrote:
>  
>
>>cat file1 | sed -e '/>>>>.*/ r file2' | sed -e '/>>>>.*/ d'
>>I'm sure the above can be achieved in only one call to sed...
>>    
>>
>
>AFAIK the '-e' option is available so that you can do this:
>  
>
>>cat file1 | sed -e '/>>>>.*/ r file2' -e '/>>>>.*/ d'
>>    
>>
>
>If you were to do two separate commands, you'd just use:
>  
>
>>cat file1 | sed '/>>>>.*/ r file2' | sed '/>>>>.*/ d'
>>    
>>
>
><shrug/>
>
>
>_______________________________________________
>plug mailing list
>plug at plug.linux.org.au
>http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug
>
>  
>

-- 
Ben New
ben at leftclick.com.au

Leftclick Software Development
http://www.leftclick.com.au/






More information about the plug mailing list