How to use a string as a delimiter shell script
- by Dan
I am reading a line and am using regex to match it in my script. (/bin/bash)
echo $line | grep -E '[Ss][Uu][Bb][Jj][Ee][Cc][Tt]: [Hh][Ee][Ll][Pp]' > /dev/null 2>&1
if [[ $? = "0" && -z $subject ]]; then
subject=`echo $line | cut -d: -f2` > /dev/null
echo "Was able to grab a SUBJECT $line and the actual subject is…