split message parts at the lines which are equal to SAS3
#!/bin/bash
IFS=$'\n'
i=0
BASENAME="split.mbox"
while read x; do
echo "$x" | grep -q '^SAS3$' && i=$(( i + 1 ))
echo "$x" >> $BASENAME.$i
done
split message parts at the lines which are equal to SAS3
#!/bin/bash
IFS=$'\n'
i=0
BASENAME="split.mbox"
while read x; do
echo "$x" | grep -q '^SAS3$' && i=$(( i + 1 ))
echo "$x" >> $BASENAME.$i
done