10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear all,
I would like to know the difference in executing the shell script both ways?
a.) source file.sh
b.) ./file.sh
I need to initialize some setup which is part of the file.sh. I realized that when I do the source file.sh the setup is all initlaized well. However, with the ./file.sh... (3 Replies)
Discussion started by: emily
3 Replies
2. Shell Programming and Scripting
Guru's,
I want to make a use of "exec" command in my script and want to check return code of executing script, but as you know exec command will terminate current processID and comeout and will trigger new one, i am unable to check return code of script and not able to run a scrpit after exec. ... (2 Replies)
Discussion started by: pawar.atul28
2 Replies
3. Shell Programming and Scripting
Hi,
What is the difference between the following commands
find . -type f -exec grep 'abc' {} \;
and
find . -type f | xargs grep 'abc'
Appreciate your help. (2 Replies)
Discussion started by: bobbygsk
2 Replies
4. Shell Programming and Scripting
I have the following bash script lines in a file named test.sh.
#!/bin/bash
#
# Write Date to cron.log
#
echo "Begin SSI Load $(date +%d%b%y_%T)"
#
# Get the latest rates file for processing.
#
d=$(ls -tr /rms/data/ssi | grep -v "processed" | tail -n 1)
filename=$d
export filename... (3 Replies)
Discussion started by: ginowms
3 Replies
5. Programming
I have read several docs on these on the web and looked at examples. I can't figure out the difference. In some cases you use one or the other or you combine them.
can someone help me understand this? (1 Reply)
Discussion started by: guessingo
1 Replies
6. Shell Programming and Scripting
Hi, Gurus,
my script code as following:
#!/usr/bin/sh
mkdir dir1
result=`echo $?`
if ; then
echo "completed"
else
echo "wrong"
fi
When I execute it with command sh filename. , it executed successfully.
but, when I execute it with command . filename it throw out error:
-bash:ELF :... (2 Replies)
Discussion started by: ken002
2 Replies
7. Shell Programming and Scripting
Hi,
I discovered the following single-line script works very well to cp a large number of files from a source directory to a destination directory while avoiding the "argument list too large" error:
# cpmany - copy large number of files
# Takes two parameters - source dir, destination dir... (14 Replies)
Discussion started by: Tanuka
14 Replies
8. Shell Programming and Scripting
Hi, experts.
Whould anybody clear explay me difference and usage of these 3 commands (particulary in bash) :
exec
eval
source
I've tryed to read the manual pages but did not get much.
Also could not get something useful from Google search - just so much and so not exactly, that is... (3 Replies)
Discussion started by: alex_5161
3 Replies
9. Shell Programming and Scripting
I am using a third party job management program called Autosys. the command to load a jil into the autosys database is jil < somefilename.jil
I have a directory and it in are a lot of jils. rather than type jil < somefilename.jil for every file I would like to script something do do it. if cd... (2 Replies)
Discussion started by: jayjabour
2 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have tried both the options in small dummy scripts, but somehow i can't differentiate between the two.
find . -name H* -exec ls -l {} \;
find . -name H* | xargs ls -l
Both work the ditto way.
Any help is appreciated. (19 Replies)
Discussion started by: vibhor_agarwali
19 Replies