View Single Post
Old 8th November 2010
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Point being, you have to write your own w command in shell script when using sed, and some people choose to for awk as well.. Which means dealing with temporary files by hand. For those who think it's simple, $ command file > file.bak && mv file.bak file is not perfect for every situation.

You know, fewer moving parts the fewer things that can break.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote