Sponsored Content
Full Discussion: #!/bin/ksh
Top Forums Shell Programming and Scripting #!/bin/ksh Post 81511 by maldini on Sunday 21st of August 2005 10:29:54 PM
Old 08-21-2005
#!/bin/ksh

Hi,

I wrote scripting to perform some jobs. (eg, run_job)
Everything works ok when i tested it on my side.
I execute the run_job manually and it works perfectly ok.

When my administrator try to run it using a scheduler job.
He encountered problem of running it.
He said it might be due to we are using ksh.

Hence, i added #!/bin/ksh in front of my code.
But seems like my program will stop running at there once i hit that #!/bin/ksh code.
Anyone know why?

Thanks!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

#!/bin/ksh

Hi. What does this command do in the shell script? #!/bin/ksh I have some scripts which do not run if this line is removed. First I thought it is comment but I think it sets up korn as shell. Sanjay (2 Replies)
Discussion started by: sanjay_g
2 Replies

2. Shell Programming and Scripting

#!/bin/ksh -e

Can you please tell me what the command "#!/bin/ksh -e" means? I tried running a ksh script with "#!/bin/ksh -e" as starting line, and with "#!/bin/ksh" as starting line - they behave differently.. Thanks! Ramya (2 Replies)
Discussion started by: ramsi_ece
2 Replies

3. Tips and Tutorials

The Whole Story on #! /usr/bin/ksh

Introduction Originally, we only had one shell on unix. When ran a command, the shell would attempt to invoke one of the exec() system calls on it. It the command was an executable, the exec would succeed and the command would run. If the exec() failed, the shell would not give up, instead it... (3 Replies)
Discussion started by: Perderabo
3 Replies

4. Shell Programming and Scripting

#!/bin/sh and #!/bin/ksh

Hi All, I have a shell (#!/bin/sh) with below piece of code: if ! then echo Staging table ABC_INT_TAB is not present in the schema >> $OUTPUT fi Shell is throwning below error and continue to work even after this error... (3 Replies)
Discussion started by: bhush782003
3 Replies

5. Shell Programming and Scripting

/bin/sh and /bin/ksh problem

we have a shell script that we are using in KSH if ]; then _IFS=$IFS IFS=: and it's failing on /bin/sh . Is there a simple way to modify it to work on both . ( not with awk) Thanks in adv (3 Replies)
Discussion started by: talashil
3 Replies

6. UNIX for Dummies Questions & Answers

fuser: difference with bin/sh and bin/ksh shell script

Hi, I have a problem I don't understand with fuser. I launch a simple shell script mysleep.sh: I launch the command fuser -fu mysleep.sh but fuser doesn't return anything excepted: mysleep: Then I modify my script switching from #!/bin/sh to #!/bin/ksh I launch the command fuser -fu... (4 Replies)
Discussion started by: Peuj
4 Replies

7. Shell Programming and Scripting

/bin/ksh: scriptname: not found. ???

I have started to write Korn scripts on the client's AIX 4.2 servers and there is this small problem that puzzles me. I code all my scripts the same way: - first line contains : #!/bin/ksh - I do this console command on every scripts: chmod +x scriptname But still, on some occasions,... (4 Replies)
Discussion started by: Browser_ice
4 Replies

8. Shell Programming and Scripting

meaning of #!/bin/ksh -p

:b:HI Friends, Can you help me understand -p option with /usr/bin/ksh shell interpreter ? Thanks, Panditt (1 Reply)
Discussion started by: deshaipet
1 Replies

9. UNIX for Dummies Questions & Answers

Usage of #!/bin/ksh

Hi, In the beginning of Shell script, we give a statement like #!/bin/ksh I have 2 questions related to this, 1) It could denote about the shell we want to use, what is the real usage of this? My shell script works even without this statement, is it a mandatory one. 2) I'm using... (7 Replies)
Discussion started by: Dev_Dev
7 Replies

10. Shell Programming and Scripting

/usr/bin/ksh -E

I saw one script using the first line as below /usr/bin/ksh -E I have used -x for debug but couldn't find what is this -E option for ? Pls let me know what is this -E used for Thanks RL (1 Reply)
Discussion started by: reldb
1 Replies
bg(1)							      General Commands Manual							     bg(1)

NAME
bg - Runs jobs in the background SYNOPSIS
bg [job_id...] Note The C shell has a built-in version of the bg command. If you are using the C shell, and want to guarantee that you are using the command described here, you must specify the full path /usr/bin/bg. See the csh(1) reference page for a description of the built-in command. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: bg: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
None OPERANDS
Specifies the job to be resumed as a background job. If no job_id operand is given, the most recently suspended job is used. The format of job_id is described in the Jobs section of the ksh(1) reference page. DESCRIPTION
If job control is enabled (see the description of set -m in the ksh(1) reference page), the bg utility resumes suspended jobs from the cur- rent environment by running them as background jobs. If the job specified by job_id is a job already running in the background, the bg utility has no effect and will exit successfully. Using bg to place a job into the background causes its process ID to become "known in the current shell execution environment", as if it had been started as an asynchronous list. See the Jobs section of the ksh(1) reference page. RESTRICTIONS
If job control is disabled, the bg utility exits with an error and no job is placed in the background. The bg utility does not work as expected when it is operating in its own utility execution environment because that environment has no suspended jobs. EXIT STATUS
The following exit values are returned: Successful completion. An error occurred. ENVIRONMENT VARIABLES
The following environment variables affect the execution of bg: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari- ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale used to affect the format and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. SEE ALSO
Commands: csh(1), fg(1), jobs(1), kill(1), ksh(1), Bourne shell sh(1b), POSIX shell sh(1p), wait(1) Standards: standards(5) bg(1)
All times are GMT -4. The time now is 06:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy