I want to capture contents of a file between 2 strings into another file
for eg all lines in between the keywords "start log" and "end log" should be copied into another file
I want to capture contents of a file between 2 strings into another file
for eg all lines in between the keywords "start log" and "end log" should be copied into another file
Here's a start:
echo "foo
bar
baz
quux
blorp" | awk '/bar/,/quux/ { print }'
Hi
Will this work from command prompt by just giving input and o/p file names ?
Sure...
awk '/bar/,/quux/ { print }' file1 > file2
using sed
sed "/start log/,/end log/w filenm" orig_file