I am trying to use the sed command but i am facing a problem when trying to replace a string containing a slash "/"
sed '/LABEL=//s// LABEL=/ elevator=deadline/g' $GRUB > $GRUBTEMP
if u notice i am trying to replace the word "LABEL=/" with "LABEL=/ elevator=deadline"
but since the slash character comes at the end of the character it is showing an error.
is there any way of trying to interpret the slash character as part of the word????
if so i would like to know
Since i implemented this without sed by doing a round about method of reading the whole file and doing this
any one has any ideas?
I would also like to know how to append a text to the end of a particular line using sed? i tried the a\ option but it showed me an error
This show i wrote it. the error i got was the the 'A' character in the appended line is not a command...
1. Try using a different delimiter than /:
or try escaping / with a '\'
2. Enclose the "APPENDED TEXT" in quotes
Er, the APPENDED TEXT is already in quotes (single ones). Did you leave a space after the a\ - that would cause an error. The backslash has to be the last character on the line.
yes it worked for me now.
i just gave the single quotes and i checked with out the space.