Dear.
I installed the ksh program using yum.
yum install ksh
Then executed the program as I made for test, but error echoed,
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory
What is the problem?
Thank you
Yongjoo CHOI
--- On Wed, 10/1/08, 최용주 choingjoo@hufs.ac.kr wrote:
From: 최용주 choingjoo@hufs.ac.kr Subject: install the Korn SHELL program To: fedora-list@redhat.com Date: Wednesday, October 1, 2008, 1:26 AM Dear.
I installed the ksh program using yum.
yum install ksh
Then executed the program as I made for test, but error echoed,
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory
What is the problem?
Thank you
Yongjoo CHOI
zsh is an improved version and is already there
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Dear. Thank you for responding, but I don't have a any sense about zsh. Please explain in detail? And if I want to use the zsh, could I change the #!/bin/ksh to #!/bin/zsh?
Yongjoo CHOI
-----Original Message----- From: fedora-list-bounces@redhat.com [mailto:fedora-list-bounces@redhat.com] On Behalf Of Fred Silsbee Sent: Wednesday, October 01, 2008 10:44 AM To: Community assistance, encouragement, and advice for using Fedora. Subject: Re: install the Korn SHELL program
--- On Wed, 10/1/08, 최용주 choingjoo@hufs.ac.kr wrote:
From: 최용주 choingjoo@hufs.ac.kr Subject: install the Korn SHELL program To: fedora-list@redhat.com Date: Wednesday, October 1, 2008, 1:26 AM Dear.
I installed the ksh program using yum.
yum install ksh
Then executed the program as I made for test, but error echoed,
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory
What is the problem?
Thank you
Yongjoo CHOI
zsh is an improved version and is already there
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Fred Silsbee wrote:
--- On Wed, 10/1/08, 최용주 choingjoo@hufs.ac.kr wrote:
From: 최용주 choingjoo@hufs.ac.kr Subject: install the Korn SHELL program To: fedora-list@redhat.com Date: Wednesday, October 1, 2008, 1:26 AM Dear.
I installed the ksh program using yum.
yum install ksh
Then executed the program as I made for test, but error echoed,
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory
What is the problem?
Thank you
Yongjoo CHOI
zsh is an improved version and is already there
Last time I checked zsh is not 100% compatible with ksh syntax. Has that changed?
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
On 02Oct2008 14:10, Eric Brunson brunson@brunson.com wrote:
I installed the ksh program using yum.
yum install ksh
Then executed the program as I made for test, but error echoed,
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory What is the problem?
[...]
zsh is an improved version and is already there
Last time I checked zsh is not 100% compatible with ksh syntax. Has that changed?
I'm impressed by how off target these responses are. His script doesn't work because he has a CR character on his scripts #! line!
최용주 wrote:
Dear.
I installed the ksh program using yum.
yum install ksh
Then executed the program as I made for test, but error echoed,
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory
What is the problem?
How did your create the script "filter"? Did you create it on a windows machine? The "^M" at the end of the line seems suspicious.
Ed Greshko wrote:
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory
What is the problem?
How did your create the script "filter"? Did you create it on a windows machine? The "^M" at the end of the line seems suspicious.
Forgot to mention you should try...
dos2unix filter
and they try to execute filter again.
Dear. Actually I executed the same file on my former linux computer without any error message. But I reinstalled the linux, then it occurred the error. I attached the 'filter' and please check up.
Thank you
Best regards,
Yongjoo CHOI
-----Original Message----- From: fedora-list-bounces@redhat.com [mailto:fedora-list-bounces@redhat.com] On Behalf Of Ed Greshko Sent: Wednesday, October 01, 2008 10:56 AM To: Community assistance, encouragement, and advice for using Fedora. Subject: Re: install the Korn SHELL program
Ed Greshko wrote:
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory
What is the problem?
How did your create the script "filter"? Did you create it on a windows machine? The "^M" at the end of the line seems suspicious.
Forgot to mention you should try...
dos2unix filter
and they try to execute filter again.
최용주 wrote:
Dear. Actually I executed the same file on my former linux computer without any error message. But I reinstalled the linux, then it occurred the error. I attached the 'filter' and please check up.
I am sure it would work if I had the appropriate files and directories....
[egreshko@misty fil]$ ./filter rm: cannot remove `*.tmp': No such file or directory rm: cannot remove `*.lst': No such file or directory gawk: cmd. line:2: fatal: cannot open file `*.type3' for reading (No such file or directory) rm: cannot remove `*.type3': No such file or directory gawk: cmd. line:2: fatal: cannot open file `*.type4' for reading (No such file or directory) rm: cannot remove `*.type4': No such file or directory gawk: cmd. line:2: fatal: cannot open file `*.type2' for reading (No such file or directory) rm: cannot remove `*.type2': No such file or directory gawk: cmd. line:2: fatal: cannot open file `*.type1' for reading (No such file or directory) rm: cannot remove `*.type1': No such file or directory
Maybe you should use the "filter" program from your email since in the process of attaching it to the email the ^M has been stripped.
Dear. You mean that the script is included the '^M' character? The error message looks a little strange. Because I executed the same file on my former linux.
./filter
: not found [No such file or directory] gawk: cmd. line:1: fatal: cannot open file `filename.tmp' for reading (No such file or directory) : not found [No such file or directory] ' unexpectedne 13: syntax error at line 14: `do
Yongjoo CHOI
I'm sorry about bothering you. I open the 'filter' by text file and directly executed on terminal. It works, but when I execute the 'filter' it echo the error message.
Yongjoo CHOI
-----Original Message----- From: fedora-list-bounces@redhat.com [mailto:fedora-list-bounces@redhat.com] On Behalf Of Ed Greshko Sent: Wednesday, October 01, 2008 1:39 PM To: Community assistance, encouragement, and advice for using Fedora. Subject: Re: install the Korn SHELL program
최용주 wrote:
Dear. Actually I executed the same file on my former linux computer without any error message. But I reinstalled the linux, then it occurred the error. I attached the 'filter' and please check up.
I am sure it would work if I had the appropriate files and directories....
[egreshko@misty fil]$ ./filter rm: cannot remove `*.tmp': No such file or directory rm: cannot remove `*.lst': No such file or directory gawk: cmd. line:2: fatal: cannot open file `*.type3' for reading (No such file or directory) rm: cannot remove `*.type3': No such file or directory gawk: cmd. line:2: fatal: cannot open file `*.type4' for reading (No such file or directory) rm: cannot remove `*.type4': No such file or directory gawk: cmd. line:2: fatal: cannot open file `*.type2' for reading (No such file or directory) rm: cannot remove `*.type2': No such file or directory gawk: cmd. line:2: fatal: cannot open file `*.type1' for reading (No such file or directory) rm: cannot remove `*.type1': No such file or directory
Maybe you should use the "filter" program from your email since in the process of attaching it to the email the ^M has been stripped.
최용주 wrote:
Dear. Actually I executed the same file on my former linux computer without any error message. But I reinstalled the linux, then it occurred the error. I attached the 'filter' and please check up.
Thank you
Best regards,
Yongjoo CHOI
-----Original Message----- From: fedora-list-bounces@redhat.com [mailto:fedora-list-bounces@redhat.com] On Behalf Of Ed Greshko Sent: Wednesday, October 01, 2008 10:56 AM To: Community assistance, encouragement, and advice for using Fedora. Subject: Re: install the Korn SHELL program
Ed Greshko wrote:
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory
What is the problem?
How did your create the script "filter"? Did you create it on a windows machine? The "^M" at the end of the line seems suspicious.
Forgot to mention you should try...
dos2unix filter
and they try to execute filter again.
Have you verified that the Korn shell (/bin/ksh) really exists on your machine (was installed properly) and that it is in a location included in your PATH variable?
What happens if you enter the command
$ /bin/ksh
In my case, I don't have ksh installed and I get:
$ /bin/ksh bash: /bin/ksh: No such file or directory
I installed the 'ksh', so when I type the command in my terminal. It echoes the '$'.
-----Original Message----- From: fedora-list-bounces@redhat.com [mailto:fedora-list-bounces@redhat.com] On Behalf Of Richard England Sent: Wednesday, October 01, 2008 1:47 PM To: Community assistance, encouragement, and advice for using Fedora. Subject: Re: install the Korn SHELL program
최용주 wrote:
Dear. Actually I executed the same file on my former linux computer without any error message. But I reinstalled the linux, then it occurred the error. I attached the 'filter' and please check up.
Thank you
Best regards,
Yongjoo CHOI
-----Original Message----- From: fedora-list-bounces@redhat.com [mailto:fedora-list-bounces@redhat.com] On Behalf Of Ed Greshko Sent: Wednesday, October 01, 2008 10:56 AM To: Community assistance, encouragement, and advice for using Fedora. Subject: Re: install the Korn SHELL program
Ed Greshko wrote:
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory
What is the problem?
How did your create the script "filter"? Did you create it on a windows machine? The "^M" at the end of the line seems suspicious.
Forgot to mention you should try...
dos2unix filter
and they try to execute filter again.
Have you verified that the Korn shell (/bin/ksh) really exists on your machine (was installed properly) and that it is in a location included in your PATH variable?
What happens if you enter the command
$ /bin/ksh
In my case, I don't have ksh installed and I get:
$ /bin/ksh bash: /bin/ksh: No such file or directory
최용주 wrote:
I installed the 'ksh', so when I type the command in my terminal. It echoes the '$'.
Save the attached and make it executable and try it....
#!/bin/ksh rm *.tmp rm *.lst for i in *.type3; do echo $i >> name.tmp gawk 'END {print NR}' $i >> nrow.tmp done
paste name.tmp nrow.tmp > filename.tmp gawk '{ if ( $2 < 1) print $1}' filename.tmp >> final.lst
for ii in $(cat final.lst) ;do rm $ii done
rm *.tmp rm *.lst for i in *.type4; do echo $i >> name.tmp gawk 'END {print NR}' $i >> nrow.tmp done
paste name.tmp nrow.tmp > filename.tmp gawk '{ if ( $2 < 1) print $1}' filename.tmp >> final.lst
for ii in $(cat final.lst) ;do rm $ii done
rm *.tmp rm *.lst for i in *.type2; do echo $i >> name.tmp gawk 'END {print NR}' $i >> nrow.tmp done
paste name.tmp nrow.tmp > filename.tmp gawk '{ if ( $2 < 1) print $1}' filename.tmp >> final.lst
for ii in $(cat final.lst) ;do rm $ii done
rm *.tmp rm *.lst for i in *.type1; do echo $i >> name.tmp gawk 'END {print NR}' $i >> nrow.tmp done
paste name.tmp nrow.tmp > filename.tmp gawk '{ if ( $2 < 1) print $1}' filename.tmp >> final.lst
for ii in $(cat final.lst) ;do rm $ii done
Dear. It works very well. What is the difference between yours and mine?
-----Original Message----- From: fedora-list-bounces@redhat.com [mailto:fedora-list-bounces@redhat.com] On Behalf Of Ed Greshko Sent: Wednesday, October 01, 2008 2:22 PM To: Community assistance, encouragement, and advice for using Fedora. Subject: Re: install the Korn SHELL program
최용주 wrote:
I installed the 'ksh', so when I type the command in my terminal. It echoes the '$'.
Save the attached and make it executable and try it....
Dear. It echoes '1,57c1,57' Then what should I do for figure it out.
Yongjoo CHOI
-----Original Message----- From: fedora-list-bounces@redhat.com [mailto:fedora-list-bounces@redhat.com] On Behalf Of Ed Greshko Sent: Wednesday, October 01, 2008 3:39 PM To: Community assistance, encouragement, and advice for using Fedora. Subject: Re: install the Korn SHELL program
최용주 wrote:
Dear. It works very well. What is the difference between yours and mine?
I am sure your file contains ^M at the end of each line.
Try doing:
diff filter testme
I created the file on 'gedit' Then change the mod for execution. Chmod u+x filter
And what is the 'dos2unix' filter. I only know about dos2unix is to change the dos program.
Yongjoo CHOI
-----Original Message----- From: fedora-list-bounces@redhat.com [mailto:fedora-list-bounces@redhat.com] On Behalf Of Ed Greshko Sent: Wednesday, October 01, 2008 10:47 AM To: Community assistance, encouragement, and advice for using Fedora. Subject: Re: install the Korn SHELL program
최용주 wrote:
Dear.
I installed the ksh program using yum.
yum install ksh
Then executed the program as I made for test, but error echoed,
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory
What is the problem?
How did your create the script "filter"? Did you create it on a windows machine? The "^M" at the end of the line seems suspicious.
최용주 wrote:
I created the file on 'gedit' Then change the mod for execution. Chmod u+x filter
And what is the 'dos2unix' filter. I only know about dos2unix is to change the dos program.
Do a "man dos2unix" to see what it is.... "OS/MAC to UNIX text file format converter".
If your file has extraneous characters at the end of the line you will see the problem you are seeing.
As I said, I suspect your "filter" script has "^M" at the end of the lines.
Do you know how to use "vi"?
--- On Wed, 10/1/08, Ed Greshko Ed.Greshko@greshko.com wrote:
From: Ed Greshko Ed.Greshko@greshko.com Subject: Re: install the Korn SHELL program To: "Community assistance, encouragement, and advice for using Fedora." fedora-list@redhat.com Date: Wednesday, October 1, 2008, 2:52 AM 최용주 wrote:
I created the file on 'gedit' Then change the mod for execution. Chmod u+x filter
And what is the 'dos2unix' filter. I only know about dos2unix is to change the dos
program.
Do a "man dos2unix" to see what it is.... "OS/MAC to UNIX text file format converter".
If your file has extraneous characters at the end of the line you will see the problem you are seeing.
As I said, I suspect your "filter" script has "^M" at the end of the lines.
Do you know how to use "vi"?
--
I was about to say "vi"... that is all I use under unix/linux
there is also kedit or kwrite
fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
--- On Wed, 10/1/08, 최용주 choingjoo@hufs.ac.kr wrote:
From: 최용주 choingjoo@hufs.ac.kr Subject: RE: install the Korn SHELL program To: "'Community assistance, encouragement, and advice for using Fedora.'" fedora-list@redhat.com Date: Wednesday, October 1, 2008, 2:28 AM I created the file on 'gedit' Then change the mod for execution. Chmod u+x filter
And what is the 'dos2unix' filter. I only know about dos2unix is to change the dos program.
Yongjoo CHOI
-----Original Message----- From: fedora-list-bounces@redhat.com [mailto:fedora-list-bounces@redhat.com] On Behalf Of Ed Greshko Sent: Wednesday, October 01, 2008 10:47 AM To: Community assistance, encouragement, and advice for using Fedora. Subject: Re: install the Korn SHELL program
최용주 wrote:
Dear.
I installed the ksh program using yum.
yum install ksh
Then executed the program as I made for test, but
error echoed,
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such
file or directory
What is the problem?
How did your create the script "filter"? Did you create it on a windows machine? The "^M" at the end of the line seems suspicious.
-- All Hell hadn't been let loose. It was merely Detritus. But from a few feet away you couldn't tell the difference. (The Fifth Elephant)
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
do: man dos2unix
create a typical trial script so we are discussing something concrete
before executing the script, you must enter the ksh by typing "ksh"
and the ctrl-d to exit ksh or zsh
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Fred Silsbee wrote:
--- On Wed, 10/1/08, 최용주 choingjoo@hufs.ac.kr wrote:
From: 최용주 choingjoo@hufs.ac.kr Subject: RE: install the Korn SHELL program To: "'Community assistance, encouragement, and advice for using Fedora.'" fedora-list@redhat.com Date: Wednesday, October 1, 2008, 2:28 AM I created the file on 'gedit' Then change the mod for execution. Chmod u+x filter
And what is the 'dos2unix' filter. I only know about dos2unix is to change the dos program.
Yongjoo CHOI
-----Original Message----- From: fedora-list-bounces@redhat.com [mailto:fedora-list-bounces@redhat.com] On Behalf Of Ed Greshko Sent: Wednesday, October 01, 2008 10:47 AM To: Community assistance, encouragement, and advice for using Fedora. Subject: Re: install the Korn SHELL program
최용주 wrote:
Dear.
I installed the ksh program using yum.
yum install ksh
Then executed the program as I made for test, but
error echoed,
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such
file or directory
What is the problem?
How did your create the script "filter"? Did you create it on a windows machine? The "^M" at the end of the line seems suspicious.
-- All Hell hadn't been let loose. It was merely Detritus. But from a few feet away you couldn't tell the difference. (The Fifth Elephant)
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
do: man dos2unix
create a typical trial script so we are discussing something concrete
before executing the script, you must enter the ksh by typing "ksh"
That is not correct.....
When you create a script the first line in the script can indicate what interpreter will be used. For example:
#!/bin/sh
#!/bin/csh
#!/bin/zsh
Your terminal session need not be the same as the script's shell.
and the ctrl-d to exit ksh or zsh
On Wed, 1 Oct 2008 10:26:35 +0900 ______ choingjoo@hufs.ac.kr wrote:
Dear.
I installed the ksh program using yum.
yum install ksh
Then executed the program as I made for test, but error echoed,
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory
What is the problem?
Thank you
Yongjoo CHOI
Hi Yonjoo,
Try running the script file through 'dos2unix' first. That Control-M (^M") at the end of the line that the error message quoted shouldn't be there, but it is used as part of the line-end sequence on DOS and MS Windows. Good luck!
-David Chipman
Dear. I tried to add the 'dos2linux', but it doesn't work. Actually I executed the same file on my former linux computer without any error message. But I reinstalled the linux, then it occurred the error. I attached the 'filter' and please check up.
Thank you
Best regards,
Yongjoo CHOI
-----Original Message----- From: fedora-list-bounces@redhat.com [mailto:fedora-list- bounces@redhat.com] On Behalf Of David Chipman Sent: Wednesday, October 01, 2008 1:10 PM To: fedora-list@redhat.com Subject: Re: install the Korn SHELL program
On Wed, 1 Oct 2008 10:26:35 +0900 ______ choingjoo@hufs.ac.kr wrote:
Dear.
I installed the ksh program using yum.
yum install ksh
Then executed the program as I made for test, but error echoed,
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory
What is the problem?
Thank you
Yongjoo CHOI
Hi Yonjoo,
Try running the script file through 'dos2unix' first. That Control-M (^M") at the end of the line that the error message quoted shouldn't be there, but it is used as part of the line-end sequence on DOS and MS Windows. Good luck!
-David Chipman
최용주 wrote:
Dear. I tried to add the 'dos2linux', but it doesn't work.
What do you mean "add" and what do you mean "doesn't work"?
Actually I executed the same file on my former linux computer without any error message. But I reinstalled the linux, then it occurred the error. I attached the 'filter' and please check up.
Thank you
Best regards,
Yongjoo CHOI
-----Original Message----- From: fedora-list-bounces@redhat.com [mailto:fedora-list- bounces@redhat.com] On Behalf Of David Chipman Sent: Wednesday, October 01, 2008 1:10 PM To: fedora-list@redhat.com Subject: Re: install the Korn SHELL program
On Wed, 1 Oct 2008 10:26:35 +0900 ______ choingjoo@hufs.ac.kr wrote:
Dear.
I installed the ksh program using yum.
yum install ksh
Then executed the program as I made for test, but error echoed,
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory
What is the problem?
Thank you
Yongjoo CHOI
Hi Yonjoo,
Try running the script file through 'dos2unix' first. That Control-M (^M") at the end of the line that the error message quoted shouldn't be there, but it is used as part of the line-end sequence on DOS and MS Windows. Good luck!
-David Chipman
On Wed, 1 Oct 2008 13:25:26 +0900 ______ choingjoo@hufs.ac.kr wrote:
Dear. I tried to add the 'dos2linux', but it doesn't work. Actually I executed the same file on my former linux computer without any error message. But I reinstalled the linux, then it occurred the error. I attached the 'filter' and please check up.
Thank you
Best regards,
Yongjoo CHOI
-----Original Message----- From: fedora-list-bounces@redhat.com [mailto:fedora-list- bounces@redhat.com] On Behalf Of David Chipman Sent: Wednesday, October 01, 2008 1:10 PM To: fedora-list@redhat.com Subject: Re: install the Korn SHELL program
On Wed, 1 Oct 2008 10:26:35 +0900 ______ choingjoo@hufs.ac.kr wrote:
Dear.
I installed the ksh program using yum.
yum install ksh
Then executed the program as I made for test, but error echoed,
./filter
Bash : ./filter:/bin/ksh^M: bad interpreter: No such file or directory
What is the problem?
Thank you
Yongjoo CHOI
Hi Yonjoo,
Try running the script file through 'dos2unix' first. That Control-M (^M") at the end of the line that the error message quoted shouldn't be there, but it is used as part of the line-end sequence on DOS and MS Windows. Good luck!
-David Chipman
Hi Yongjoo,
the command is dos2*unix*, not dos2*linux*. See the difference?
-David