bash command in cygwin

Buchbinder, Barry (NIH/NIAID) [E] BBuchbinder@niaid.nih.gov
Fri Mar 9 19:02:00 GMT 2007


Vaclav Haisman wrote on Friday, March 09, 2007 2:57 AM:
> ovince wrote:
>> I managed to do everything in Cygwin that I was doing in Unix. This
>> is the first thing that does not want to work. It is a simple bash
>> command 
>> 
>> for file in 'cat listBox1.txt'; do awk '{print $0}'; done
>
> I doubt this works anywhere. You are using simple apostrophes instead
> of `backticks`. 
> 
>> Could you tell me what I do wrong here?

Also, you are not giving awk anything to work on.  With no file, it will
wait for stdin, which is not giving anything either.  You probably meant

  for file in `cat listBox1.txt`; do awk '{print $0}' ${file} ; done

Also, the
	$( command or pipe )
synonym for
	` command or pipe `
is more versatile than backticks and something with which you should
familiarize yourself.

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list