Hi,
I have a file with the content:
I need to remove all the name lines that exist between for (first line) and do line so that i can replace with new names.
Output file should look like:
when i use the below command, it is deleting for line and do lines as well.
Please take for line and do line as a reference because we may not sure about the number of lines between for line and do line. Those lines get changed every time.
Thanks in advance!!
-SREE
I have a file with the content:
Code:
for name in \
sree\
rama\
laila\
srihari\
vicky\
john
do
echo $name
done
Output file should look like:
Code:
for name in \
do
echo $name
done
Code:
sed -i '/for/,/do/d' file
Thanks in advance!!
-SREE