I thought cat started every new file on a new line...
Bad assumption, maybe...
--------------
This code creates both files, but they are way too small!!! Can anyone justify this?
Code:
cat bothfiles | while read line
do
if [ $flag -eq 0 ]
then
if [ -z "`echo "$line" | grep "separation"`" ]
then
echo "$line" >> file1
else
flag=1
fi
else
echo "$line" >> file2
fi
done
Remember,
bothfiles is the result of
Code:
cat file1 tmp file2 > bothfiles
and tmp is now the result of
Code:
echo -e "\n separationMarker " > tmp
Bookmarks