![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| FrobTADS 0.11 (Interpreter branch) | iBot | Software Releases - RSS News | 0 | 04-14-2008 10:50 PM |
| FrobTADS 0.10 (Interpreter branch) | iBot | Software Releases - RSS News | 0 | 04-01-2008 08:20 AM |
| When I am writing my own interpreter... | Legend986 | High Level Programming | 34 | 11-08-2007 10:15 AM |
| bad interpreter: Permission denied | earnstaf | UNIX for Dummies Questions & Answers | 7 | 07-19-2007 03:17 PM |
| /bin/sh: bad interpreter: Permission denied | Calum | Shell Programming and Scripting | 4 | 05-06-2003 05:14 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
#!/usr/bin/ksh Command Interpreter in a sh script
Hi,
I have a developer that is trying to start a script with sh "scriptname". In the script, he is specifying #!/usr/bin/ksh as the command interpreter. For some reason sh is ignoring the #!/usr/bin/ksh. We are running Solaris 8. Does anyone have any ideas what could be causing this? Here is the script: #!/usr/bin/ksh #--create test file to read # echo "1" > test_file echo "2" >> test_file echo "3" >> test_file #--WHILE READ should populate variables when shell contains #!/usr/bin/ksh # record_cnt=0 initial="OUTSIDE" while read record ##--placed into $record do record_cnt=`expr $record_cnt + 1` initial="INSIDE" echo "Records Read=$record_cnt” done < test_file ##--input file to be read echo " " echo "Records Read=$record_cnt" echo "Initial=$initial" exit 0 |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
sh is ignoring it because it's a comment. Feeding a ksh script into sh like that is not the correct thing to do. But if you do it, sh will attempt to run it. Read our faq article on this subject.
|
|
#3
|
|||
|
|||
|
Thanks, Perderabo. Can you post the link for the FAQ?
|