02-13-2015
Difference in executing the script
Hi Team,
a silly question.
Let's say i have a script called xyz.ksh
what is the difference in executing the script as follows?
./xyz.ksh
ksh xyz.ksh
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can anyone tell me the difference between the following
execution ways:
1) . ./filename
2) ./filename
Also when to use the either. (8 Replies)
Discussion started by: Shivdatta
8 Replies
2. UNIX for Dummies Questions & Answers
Is there any difference in executing the shell using sh and . and ./.
I had a shell script and i observed that anyone is ale to execute the script eith sh even without having the execute permission.how is so? (2 Replies)
Discussion started by: soumyo_das
2 Replies
3. Shell Programming and Scripting
Hi ,
Kindly advice whats wrong with this script. It is not executing.
...#
#!/bin/ksh
find. -name "b.log"
if ; then
echo "1"
fi
...#
Thanks (5 Replies)
Discussion started by: himvat
5 Replies
4. UNIX for Advanced & Expert Users
I need to execute a shell script kept in unix machine from windows. User id, password area available.
For eg.
There's a shell script wich moves all the logs kept in my home directory to a directory named LOGS.
Now i need to get this done through windows; either using a batch file, or java... (4 Replies)
Discussion started by: rajneesh_kapoor
4 Replies
5. Shell Programming and Scripting
Hi All,
I know this has been discussed a lot but still I need some more answers. I am running this is ksh on AIX 5.3
I believe putting a "." in front of the script will start a new shell, is that correct??
I have a script which override some PATH variables and it does not do that... (3 Replies)
Discussion started by: Hangman2
3 Replies
6. Shell Programming and Scripting
Hi,
I have a script get_DB_var.ksh which do a data base call and get some variables as below:
sqlplus -silent $user/$pass@dbname <<END
select col1,
col2,
col3
from table_name where col4=$1;
exit;
END
Now I want to access all these variables i.e.... (9 Replies)
Discussion started by: dips_ag
9 Replies
7. Shell Programming and Scripting
Hi Guys,
Hope you are doing well out there.
Can you please let me know why do we use "./" to run a shell script?
Is it to run the script in the current shell or something else?
What if I have already defined a bang in the script say #!/bin/ksh and then running the script as... (2 Replies)
Discussion started by: singh.chandan18
2 Replies
8. UNIX for Dummies Questions & Answers
Hi ,
What is the diffence between executing the script like
./myscript.ksh
. ./myscript.ksh
I have found 2 difference but could not find the reason
1. If i export a variable in myscript.ksh and execute it like . ./myscript.ksh the i can access the other scripts that are present in... (5 Replies)
Discussion started by: max_hammer
5 Replies
9. UNIX for Dummies Questions & Answers
Hi i wrote a script which dosent exists after executing any help
#!/bin/bash
netstat -ptlen | grep 10000
if ; then
echo "Hive Thrift server is running"
exit 0
else
echo "Hive Thrift server is down Trying to Bring up the service" | mail -s "ALERT" team@domain.com
`nohup hive... (7 Replies)
Discussion started by: vikatakavi
7 Replies
10. Shell Programming and Scripting
Hi,
I am new to UNIX and want to execute oracle script from unix script.
I have written below script but i am getting below error.
#!/bin/bash
file="/home/usr/control/control_file1"
while read line
do
#$line=@$line
#echo $line
sqlplus tiger/scott@DB
@$line
exit
#echo "$line"
done... (3 Replies)
Discussion started by: vipin kumar rai
3 Replies