The system is Linux Debian 7 32bit.
I have problem when I try to replace some codes in all files in the same folder.
The file names for example is:
--ADBCABCD-.html
ABCDABCD.html
for example I want replace code < script > with < iframe > the command for replace
sed -i "s|< script >|< iframe >|g" *
I see this problem after I do this command
sed: invalid option -- 'A'
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...
this because the files name Contain -- and -
same this file name --ADBCABCD-.html
please how I fix this problem I have a lot of files name Contain -- and -
Use a
--option. This is the most prevalent option in most Unix utilities.Alternatively, while using glob for matching, add the directory prefix:
No one will treat
./--as an option, right?