I am writing following script:
And passing following parameter to it, then I got the error.
huangyingw@laptop:~/bashrc$ cat fr.sh
sed -i "s/"$1"/"$2"/gi" $file
I think it is caused by the special character "Slash" in the parameter.
huangyingw@laptop:~/myproject/git/test_fr$ fr ~/myproject/git/makefile/GNU_makefile_template ~/myproject/git/GNU_makefile_template
sed: -e expression #1, char 9: unknown option to `s'
How could I work around this?