Well,
#!/bin/sh
########################
##
########################
echo MARK >> oldfile
echo >> oldfile
touch newfile
while read line do
if [[ "$line" =~ "MARKER" ]]; then
break
fi
echo $line >> newfile
done < oldfile
sed -i 'N;/\([[:alnum:]]\+\)/,/MARKER/d' oldfile
I guess this will work fine, make a try.
--~--~---------~--~----~------------~-------~--~----~
### Jordan Linux Users Group ###
http://Jolug.org/
http://groups.google.com/group/Jolug
### Ubuntu Jordan LoCo Team ###
https://wiki.ubuntu.com/JordanTeam
http://lists.ubuntu.com/ubuntu-jo
### Ojuba Linux ###
http://ojuba.org/
### Jordan PHP ###
http://groups.google.com/group/JoPHP
-~----------~----~----~----~------~----~------~--~---