delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
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]" <BBuchbinder AT niaid DOT nih DOT gov> |
To: | <cygwin AT cygwin DOT com> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |