On 1/10/06, Whelan, Paul <[EMAIL PROTECTED]> wrote:
> Like so: cat abc.txt | cut -d, -f3

1.  Randal Schwartz likes to call that UUOC (Useless Use Of cat).  :-)
 You can just do this instead:

      cut -d, -f3 < abc.txt

If you like the input file at the start of the command line, that's legal, too:

     < abc.txt cut -d, -f3

You can read more about UUOC at: http://sial.org/code/shell/tips/useless-cat/

2. The above simply returns the third field.  OP appeared to want only
lines containing "univ".  So:

     cut -d, -f3 < abc.txt | grep univ

3. I'll leave the quote removal as an exercise to the reader.  ;-)

-- Ben "Pedantic" Scott  ;-)
_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss

Reply via email to