ksh file execution problem


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ksh file execution problem
# 1  
Old 08-23-2011
ksh file execution problem

Hi,
There is a ksh file as below
HTML Code:
/scripts/dir> ls -ltr script.ksh
-rwxrwxrwx    1 oprlxr   lxr            4937 Aug 19 11:13 script.ksh
i logged on to the server with my ID and able to see the above file. I tried executing it but it was shoing below error.
HTML Code:
(JSKOBS) /scripts/dir> ./script.ksh
ksh: ./script.ksh:  not found
Can someone tell me why it shows above error.
# 2  
Old 08-23-2011
Try:
Code:
ksh -x script.ksh

and you should see what's your problem.
# 3  
Old 08-23-2011
The first line may not be correct - shebang statement. If it is ksh it should be
#!/usr/bin/ksh or #!/bin/ksh

regards,
Ahamed
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sequential execution of commands in ksh

I need to run few commands in a ksh script sequentially. Some of the commands are jobs submitted to the server and the consecutive commands are dependent on the completion of the jobs submitted to the server. It works if i separate the commands into different files like this #!/bin/ksh... (1 Reply)
Discussion started by: prashob123
1 Replies

2. Shell Programming and Scripting

Execution Problem with dispalying file content using menu driven script

HI All.. below is my menu options script. in option 2,3 and 4 im giving input and they are saving into their respective text file. problem is when im trying to "cat" those files in options 7,8 and 9 im not getting the output. no respective file contents are displaying on screen. but if i... (1 Reply)
Discussion started by: saichand1985
1 Replies

3. Shell Programming and Scripting

Execution of KSH after the Other ENDS

I have couple of scripts which I may have to execute one after the other. The Script1 creates trg files and second sciprt need to look for this trg file and proces further. I read in the forum that (./test1.sh && ./test2.sh) would work. Can you please let me know how do i use this where I need to... (3 Replies)
Discussion started by: Sukruth Kumar
3 Replies

4. UNIX for Dummies Questions & Answers

execution problem

Hi I am automating my few commands out of which one command is tail -f running.logs when i run this command it does not automatically exit and show prompt (#) what would i do so that it will exit out automatically after few seconds and move to the next command without using ... (4 Replies)
Discussion started by: esumiba
4 Replies

5. Shell Programming and Scripting

KSH - Execution Time

Hello, I am on solaris 9 (KSH). I need to get the execution time of my script. I can't use the time command as I have to send by mail the result in a human readable way. So I am looking for a code to add to my script. The output result would be : Execution time :... (1 Reply)
Discussion started by: Aswex
1 Replies

6. Shell Programming and Scripting

Execution problem with ksh

Dear All, I have a script as follows: 1 #! /bin/ksh 2 # 28 varDate=`date +%d%h%y` 29 export spool_file=/app/my_user/work/TH_Status_${varDate}_Check.txt 30 31 ######################### 32 # Unix Code Starts here # 33 ######################### ... (3 Replies)
Discussion started by: saps19
3 Replies

7. Shell Programming and Scripting

KSH SHELL: problem calculation number of lines inside compressed file

Hi Gurus, I am working with a korn shell script to simplify some operations of calculation number of lines inside compressed file. The called function (inside a cycle) is the following: ######################################### # F.ne: CheckCount #########################################... (3 Replies)
Discussion started by: GERMANICO
3 Replies

8. Shell Programming and Scripting

Execution problem with sort the file based on contents

My input file: >ali ASSDDGHFHFHJFJHJDSDGSDGSDGSDGSDGSDGSDGDSGDSGSDGDSGSDGSDGDSGSDGGDSG >zzz ASdASDASDSADSADDSADJKHJDSADKLJADKLSAJDLJLKJLDASDDSADd >abu ASDASDFSAFASFSADFASDASDSADSADSADSADSADSADASDASdSADSADSADA >aaa... (2 Replies)
Discussion started by: patrick87
2 Replies

9. Shell Programming and Scripting

File execution problem

hi all currently we are building lot of new servers(50+).What im looking for is a small piece of code that should help me in running a script that will configure company specific software in all the new boxes.For that currently we have to login to each and every new box manuallly and run that... (2 Replies)
Discussion started by: coolkid
2 Replies

10. Shell Programming and Scripting

How to create file execution in KSH shell

Dear all, I'm new in Unix system, I need help about how to create execution file. for example in my system i have file fg* when i open fg file i get : cmd='basename$0' $cmd "$@" how to create file like that (execution file) in KSH shell thank you for your help heru (4 Replies)
Discussion started by: heru_90
4 Replies
Login or Register to Ask a Question