|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by kkatula in Shell Scripting, Bourne Shell (sh), Unix Systems Programming
I have a Unix script that I need to parse a data file and kick out any line where the 4th field has less than 15 characters. I have this which works fine until there are no lines that need to be kicked out. When every line has a field 4 with at least 15 characters, the grep below yields a zero byte file. Any ideas?
awk -F"|", 'length($4)<15' /tmp/listfinal >> /tmp/deleteme
/usr/xpg4/bin/grep -v -f /tmp/deleteme /tmp/listfinal > /tmp/listclean
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625