03-30-2009
My guess would be that without the shebang line (#!), the script automatically is executed by the current shell (maybe in a subshell as it seems from the example you gave). With the shebang line the script is passed to an exec call, where the system, instead of the currently running shell, decides which interpreter to start.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Is there a way to determine if the script has been invoked manually or not( might be invoked by a schedular or crontab)?
Thanks, (8 Replies)
Discussion started by: hitmansilentass
8 Replies
2. Shell Programming and Scripting
Hi,
When I invoke a script s1.sh it will call an another script s2.sh by itself. This script s2.sh will call some java files, so while running the script it asks for a file name to be processed. Which we can see in the screen.
The file name to be processed is present in script s1.sh
Now... (1 Reply)
Discussion started by: venu_eie
1 Replies
3. UNIX for Advanced & Expert Users
Hi,
When I invoke a script s1.sh it will call an another script s2.sh by itself. This script s2.sh will call some java files, so while running the script it asks for a file name to be processed. Which we can see in the screen.
The file name to be processed is present in script s1.sh
Now I... (2 Replies)
Discussion started by: venu_eie
2 Replies
4. Shell Programming and Scripting
Hi,
I have the following script -
fixpart="/files/myScript # Transfer Script"
echo "Specify the transfer frequency in minutes - "
echo "every 1, 2, 3, or 5 minutes (default every 1 minute) "
echo $nn "Frequency ? :" $cc
read ans
case $ans in
2) echo... (9 Replies)
Discussion started by: angshuman_ag
9 Replies
5. Shell Programming and Scripting
Hi ,
I am new to shell scripting.
I am using Linux for doing scripting.
Below is my script, which takes 2 parameters as input.
test.sh has the below:
#!/bin/bash
. $HOME/.profile
gpg --yes --no-use-agent -r "$(eval echo \$$2_Var)" -e $1
1st parameter is command line... (7 Replies)
Discussion started by: rangarb
7 Replies
6. Shell Programming and Scripting
Hi All,
I have two scripts - ScriptA and ScriptB
ScriptA has logic to invoke ScriptB :
- with some parameter
- or without any parameter
ScriptB can also be invoked by the user from the command line.
Is there anyway to ensure that when I execute ScriptB from the command line, it does... (3 Replies)
Discussion started by: chaitanya.gvc
3 Replies
7. AIX
I have an investigation job at hand where I have to know when was the FIRST time the daemon was invoked.
Now, currently what I can see as the time since invoked was some where near the last reboot which is kind of obvious that the daemon stopped and recycled after reboot.
But I want to know the... (6 Replies)
Discussion started by: TH3M0Nk
6 Replies
8. Shell Programming and Scripting
-EDIT-
I have solved my problem below by using a different program. Instead of xsel I am using xclip which basically does the same thing and works fine from a script invoked by a global hotkey.
-END EDIT-
Hi,
I've written a simple script to copy my email address into both the... (0 Replies)
Discussion started by: gencon
0 Replies
9. Shell Programming and Scripting
hi gurus,
I have tried myself to invoke an oracle function. there are three different function available need to be called for differnt. can you tell me whether the below code is correct to call oracle function from shell script.
Any help would be highly appreciated.
cat location.sh
... (5 Replies)
Discussion started by: arun888
5 Replies
10. UNIX for Beginners Questions & Answers
In Bash shell - the ps -ef shows only the /bin/bash but the script name is not displayed ? Is there any way to get the script names for the process command ?
--- Post updated at 08:39 AM ---
in KSH (Korn Shell), my command output shows the script names but when run in the Bash Shell... (3 Replies)
Discussion started by: i4ismail
3 Replies