Ugarit Ebla on 10 Oct 2008 16:58:16 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] egrep help


if the file content is something like

1|192.168.0.102||xyz|abc

where the ip address is always in the second column then do

cat *.csv | cut -d\| -f2 \
  | sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n (from JPVossen's email)


Michael Lazin wrote:
Hi, I'm trying to grep a CSV for an IP address followed by ||

I tried grep Developer *.csv | egrep \|*\.*\.*\.*\|\||head

but this is not working, it is picking up false positives, what I am looking for specifically is an IP address followed by || in the csv.  I am working on trying to teach myself regular expressions now but I am just in the beginning stages.  Any help would be appreciated. 

--
Michael Lazin
To gar auto estin noein te kai enai

___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug