This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: read command available?
- From: "Hannu E K Nevalainen" <_garbage_collector_ at telia dot com>
- To: <cygwin at cygwin dot com>
- Date: Wed, 18 Aug 2004 14:46:14 +0200
- Subject: 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/