From: Thomas Demmer Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP gawk peculiarity Date: Sat, 10 Jan 1998 18:11:44 +0100 Organization: Lehrstuhl fuer Stroemungsmechanik Lines: 36 Message-ID: <34B7ABD0.8A1E4EF2@LSTM.Ruhr-UNI-Bochum.De> References: <34B6D45A DOT 8A0733FB AT a DOT crl DOT com> NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Weiqi Gao wrote: > > One of my coworkers showed me a peculiar behavior of the DJGPP awk: > > ====================================================================== > C:\TEMP> cat junk > 123 456 > > C:\> awk 'length($1) < 2 {print $1}' junk > 123 > ====================================================================== > > What am I missing here? Which version do you use? On my linux box I have 3.0.3, and that gives the correct answer. OTOH... I wonder why this works in the first place... Typing as above under DOS gives me a File not found. Replacing the ticks by " works fine. I am not sure, but I guess the < 2 gets spoiled by command.com to redirect stdin from a file 2. -- Ciao Tom ************************************************************* * Thomas Demmer * * Lehrstuhl fuer Stroemungsmechanik * * Ruhr-Uni-Bochum * * Universitaetsstr. 150 * * D-44780 Bochum * * Tel: +49 234 700 6434 * * Fax: +49 234 709 4162 * * http://www.lstm.ruhr-uni-bochum.de/~demmer * *************************************************************