I am writing a shell script, which take parameters as command line arguments and replace the content in a file with the same.
But when I am taking a directory path as command line parameter, I am not able to replace the content in that file with the directory path.
Please find the below content.
keep_remote_files =
remote_dir = destination
I am trying to replace destination
with a directory path provided at time of command line execution. (e.g.: /server/path-to-folder/position
).
when using the command
sed -i "s/destination/$1/g"
while executing;
./test "/server/path-to-folder/position"
I am getting this error:
sed: -e expression #1, char 18: unknown option to `s'
can anyone help me on this?