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

Re: Bash equivalent to DOS /p



--- John Summerfield <debian@ComputerDatasafe.com.au> wrote: 

> 1. Because it's a useful working example, unlike many others

Oh, wow.

> cat /etc/passwd | awk "/$USER/ {print \$0}"
> 
> Of course, the awk program could be quite a deal more complicate than
> that.

So? That's still not a valid argument from [1]:

awk -F: '/$user/ {print $2}' ./filename

-- Thomas Adam

[1] No, I don't want an obscure example, nor do I care. My point here is
that the "Useless use of Cat" scenario still applies when a program can
accept files.

=====
"The Linux Weekend Mechanic" -- http://linuxgazette.net
"TAG Editor"                 -- http://linuxgazette.net

"<shrug> We'll just save up your sins, Thomas, and punish 
you for all of them at once when you get better. The 
experience will probably kill you. :)"

 -- Benjamin A. Okopnik (Linux Gazette Technical Editor)


	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself http://uk.messenger.yahoo.com



Reply to: