Hi all
I am having difficulty using the sed command.
I want to replace backward slashes in a file with forward slashes.
I can replace "\a" with "/a" using sed 's/\\a/\/a/g' ${ORIG_FILE}.01 > ${ORIG_FILE}.02
However if I use the for loop command below it doesn't work:
for LETTER in a b c d e f g
do
sed "s/\\${LETTER}/\/${LETTER}/g" ${ORIG_FILE}.01 > ${ORIG_FILE}.02
mv ${ORIG_FILE}.02 ${ORIG_FILE}.01
done
Cheers and thanks
Dduuhh
I am having difficulty using the sed command.
I want to replace backward slashes in a file with forward slashes.
I can replace "\a" with "/a" using sed 's/\\a/\/a/g' ${ORIG_FILE}.01 > ${ORIG_FILE}.02
However if I use the for loop command below it doesn't work:
for LETTER in a b c d e f g
do
sed "s/\\${LETTER}/\/${LETTER}/g" ${ORIG_FILE}.01 > ${ORIG_FILE}.02
mv ${ORIG_FILE}.02 ${ORIG_FILE}.01
done
Cheers and thanks
Dduuhh