i am trying to check for a string in a text file. If string1 does not exisit then add string1 after string 2. Else string1 exists do nothing.
Here is what i have so far:
if [ string1 does not exisit ] //Stuck at this
then
sed '/string2/ a\ string1' myfile
fi
Also how can include the "/" character in my strings?