X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: bash command in cygwin Date: Fri, 9 Mar 2007 14:02:43 -0500 Message-ID: <31DDB7BE4BF41D4888D41709C476B657068AABBE@NIHCESMLBX5.nih.gov> In-Reply-To: <45F11347.1060207@sh.cvut.cz> References: <9389668 DOT post AT talk DOT nabble DOT com> <45F11347 DOT 1060207 AT sh DOT cvut DOT cz> From: "Buchbinder, Barry \(NIH/NIAID\) [E]" To: X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l29J2vWa005997 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/