Decision:
sed -i '' 's/ :(float)//g' *
sed -i '' 's/[chuck]: cleaning up...//g' *
Explanation:
I can get:
sed -ie 's/ :(float)//g' *
but creates files that store old files.
This is because the sed i flag should work this way
-i extension
Edit files in place, saving backups with the specified extension. If the extension is set to zero, the backup will not be saved.
In this case, e interpreted as the extension with which you want to keep your backups. This way all your source files will be copied using e added to their names.
To provide a zero-length extension, you need to use -i '' .
Note Unlike -i<your extension> , -i'' will not work. In order for it to work, you need to have a space between -i and. ''
Removing the -e flag results in an unchanged error.
When you delete e immediately after -i , i.e.
sed -i 's/ :(float)//g' *
s/ :(float)//g will now be interpreted as an extension argument for flag i . And the first file in the list of files created by the * shell extension is interpreted as a sed function (most likely s/regular expression/replacement/flags ). You can verify this by checking the output
sedfn=$(echo * | cut -d' ' -f1); [[ ${sedfn:0:1} == "s" ]]; echo $?
If the output of the above sequence of commands is 0 , our assumption is checked.
Also in this case, if somehow the first file name qualifies as a valid s/regular expression/replacement/flags sed function, the other file names will be interpreted as normal sed files to work with.