Hi... I have a file that contains name and address information. The primary address appears from byte 116-150. I need to pull all records off of that file where primary address is NOT blank, and put them into a new file. Can anyone help me out here???
Well... I tried all the solutions... The two awk examples don't work for me because i need to pull off all records that have spaces in the primary address field. The shell example pulls off all records where primary address is blank, which is the opposite of what i need. Anyonw know how I could flip that around???
while read record
do
x=$(echo "$record"|cut -c116-150)
case $x in
+([ ]))
continue;;
*)
echo "$record" >> newfile;;
esac
done < oldfile
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.