Re: Korn shell script Question



On Wed, Jan 31, 2007 at 01:43:28PM -0500, Dak Ghatikachalam wrote:
I tried with several looping for some reason I dont seem to get in right in
Korn shell

Any ideas on Ksh would be great, You can use any standard unix utilities to
achieve this.

Something to this effect should suffice, though I'm not convinced there's not a simpler way.

#!/usr/local/bin/ksh

{ while cat file1.txt; do false; done } |&

cat file2.txt |
while read file_b
do
read -p file_a
echo $file_b $file_a
done >file3.txt
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Korn shell script Question
    ... in Korn Shell ... I tried with several looping for some reason I dont seem to get in right in ... Any ideas on Ksh would be great, You can use any standard unix utilities to ...
    (freebsd-questions)
  • Re: Bug in bash? different from ksh, at any rate...
    ... behavior exhibited by ksh. ... it's a bug in bash that ksh gets ... echo "$AA" | while read i ... As noted in other responses to my question, the behavior depends on how your particular shell does pipes You have the "MirBSD Korn Shell". ...
    (Debian-User)
  • Re: Installing ksh from AT&T
    ... on UNIX that uses the Korn shell, ... ksh from AT&Ts, but, being a UNIX newbie, I am not sure where to put the ...
    (comp.sys.mac.apps)
  • Re: Installing ksh from AT&T
    ... on UNIX that uses the Korn shell, ... ksh from AT&Ts, but, being a UNIX newbie, I am not sure where to put the ... BTW Tiger has ksh installed by default - you might want to upgrade to ...
    (comp.sys.mac.apps)
  • Re: how can I write a shell program to count how many files in this directory?
    ... CNT++ is not valid for ksh. ... I rewrote your script in ksh (Korn shell) below, ... echo $CNT files in current directory. ...
    (comp.unix.shell)