On Thu, Mar 18, 2004 at 03:13:09PM -0800, Jason wrote:
> I am an awk user by habit and would usually do an:
>
> $ awk -F: '{print $1}' /etc/passwd
>
> for this, but cut saves some typing and seems more
> logical for these cases where you don't need to do
> selective (regex) printing.
What you typed is about the limit of my awk knowledge. Cut has the annoying
condition that delimeters are one character. So if there is some input:
happy.com OK
test.com REJECT
$ cut -f 2 -d \ <-- space after \
Will print a space, specifically the 2nd space after the com on each column.
$ awk '{print $2}'
will print the OK and REJECT column.
Cory
--
Cory Petkovsek Adapting Information
Adaptable IT Consulting Technology to Your
(858) 705-1655 Business
[EMAIL PROTECTED] www.AdaptableIT.com
_______________________________________________
EuG-LUG mailing list
[EMAIL PROTECTED]
http://mailman.efn.org/cgi-bin/listinfo/eug-lug