I have a script called test and I am trying to take in an argument and replace backslashes with forward slashes. If I do the following:
echo $FIRST_ARGUMENT | sed 's/\\/\//g'
echo 'aaa\aa'| sed 's/\\/\//g'
While passing it to the
./test, use quote
Below is the example to show difference between content with quote and without quote:
moin@moin-pc:~$ echo aa\aa aaaa # without '\' moin@moin-pc:~$ echo "aa\aa" aa\aa # with '\'
Also read: Meaning of backslash