1

sed and variable as target file

view story
linux-howto

http://www.unix.com – Code: for file in `ls /tmp/*_sw_list`; do   /usr/bin/sed -i '' '1,/^Software\ Update/d' $file done In my script, this doesn't work. I can copy-and-paste it, and it works. Enabling debugging shows it is resolving the file name correctly... it isn't an issue with special characters in the filename. It returns an error code of 0, but doesn't actually modify the file. Permissions on the file are 644. (HowTos)