03-29-2017
You prefix sh when you want a specific shell to be used to interpret the script and not the current shell of the current user, no matter if interactive or as crontab entry.
Last edited by cero; 03-29-2017 at 09:00 AM..
This User Gave Thanks to cero For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have several crontab scripts running which email me status. Some of these scripts perform identical tasks so I get a similar emails sent to myself.
How do I get the script to print it's own path/filename so I can include it in the status updates without hardcoding trhe filename into the... (1 Reply)
Discussion started by: uXion
1 Replies
2. UNIX for Dummies Questions & Answers
Hi everyone,
I'm very new, I just wrote a script "Hello World" :) LOL
How can I execute the script without the ./myscript.
I want to just type "myscript" basically from anywhere without the " ./ ".
Thanks a bunch,
NinjaX (2 Replies)
Discussion started by: NinjaXman
2 Replies
3. Solaris
I have simply downloaded a file to my local folder, made one small change and uploaded it back, ever since it will not run the file.
I have now uploaded the original, unchanged file, which still doesn;t work.
Evertime it is run ot says bash: ./nrcardprint: No such file or directory
The... (10 Replies)
Discussion started by: Heidi.Ebbs
10 Replies
4. AIX
How to run a script from any directory?
Should i include any environment or wat should i start with in writing a script ? (1 Reply)
Discussion started by: rollthecoin
1 Replies
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
I am going to run the scripts (filetest.sh)
Its run with.....
./filetest.sh
sh filetest.sh
but not run with.....
filetest.sh ( giviing error command not found)
tell me the way how we can do it ? (6 Replies)
Discussion started by: ani83_pune
6 Replies
7. Solaris
Hi,
I am using solaris 10.Is there any way to execute the script with the scriptname wihtoug using ./scriptname?Also does it varies from shell to shell.I have scripts in bash,ksh,sh shells.
Example:script.sh is the script name.I need to execute the script like this script.sh instead... (4 Replies)
Discussion started by: muraliinfy04
4 Replies
8. Shell Programming and Scripting
Hi
I was wondering if there was any command with autorep that can be used to check what the jobname is by givin scriptname that is defined in the JIL of the job (1 Reply)
Discussion started by: sidnow
1 Replies
9. UNIX for Dummies Questions & Answers
I am from MQ/MB technology. My requirement is to display the queue manger and broker status on daily basis.
If I manually run the script, it works fine and displays output. But when I have scheduled the same using cronjobs it shows only the queue manger status and not the broker status.
Can... (3 Replies)
Discussion started by: Anusha M
3 Replies
10. Shell Programming and Scripting
Hello all,
Can someone help with one script?
I have as example 3 scripts
1.sh
sleep 60 &
sleep 60 &
sleep 10 &
sleep 80 &
sleep 60 &
2.sh
sleep 40 &
sleep 5 &
sleep 10 &
sleep 70 &
sleep 60 &
3.sh (2 Replies)
Discussion started by: vikus
2 Replies