hi all,
i am again surrounded by a big problem,,,
i have 2 files
file1.txt file2.txt
aaaa xxxx xxxxx
xxxxxxxxxxxxxxx
zzzz zzzz zzz bbb
aaaa xx xxxx xxxx
xxx zzzz zzzz zzz
yyy yy xx xxxxxx
i need to have selection in the script as
#!/bin/sh
for file in file*txt
do
sed -n '/aaa/,/bbb/p' $file >outputfile
done
but i get in outfile is mix of required pattern space {ie aaa--bbb} and unwanted space from {aaaa(II)--EOF}
how to remove this second unwanted pattern spaces from getting printed ...