This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: read command available?


"Jarzombek, Svend" wrote:

> I am new to cygwin and try to move some ksh scripts to it.
> I am lacking the read command, e. g. like in
> 
> cd /directory
> ls | while read TEST
> do
>      echo $TEST
> done
> 
> 
> Is the read command somewhere available? Up to now I wasn't able to
> find it. 

ksh:
$ type read
read is a shell builtin

Hmm... are you using it correctly?
Type this at a shell prompt, enter for both lines.
man ksh
/^ *read \[


As I'm not familiar with ksh, so:
-- *bash* usage example --
#!/bin/bash

cd /
ls | (
  while read TEST ;do
    echo -n $TEST 
  done
 )

--
If you find something similar to this:
$ cat abs-guide.url 
[InternetShortcut]
URL=http://www.cs.unibo.it/~montreso/doc/bash/abs-guide.pdf
Modified=F0515A7BC647C401E8

...but slanted for ksh, you might be better off.


/Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E         --72-->

** mailing list preference; please keep replies on list **

-- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); --
--END OF MESSAGE--

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]