The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
How to compare null and space using single if condition
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Portal
Register
Forum Rules
FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
How to compare null and space using single if condition
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
05-15-2008
era
Herder of Useless Cats
Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,605
Or just simply
Code:
egrep '(^|,)" *"(,|$)|^,|,,|,$' temp.txt
If there are fields which contains commas inside the double quotes, you need to elaborate on this (but it's not hideously complex then, either).
era
View Public Profile
Visit era's homepage!
Find all posts by era