I've looked at the other sed
pages here and i cannot find one that uses -i
with a variable in the regex search portion. I am trying to cut out a requested line in the file myresolv.conf
and by getting its line number. 5 people in my class are all stuck :(
Any help is awesome
line=$(grep -n "$3" ./myresolv.conf | cut -d: -f1)
sed -i "$line" ./myresolv.conf
remove line
when you saycut out line
?