10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Geeks,
Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s).
Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies
2. UNIX for Dummies Questions & Answers
How do i check success status of a sed command execution i have the below script not sure if it is right approach to check status of execution using a function.
Also it looks like in the below sed command even if the search string doesn't exist in the file it is returning status as success as i... (6 Replies)
Discussion started by: Ariean
6 Replies
3. Shell Programming and Scripting
Hi,
i am a novice in scrpting and need your help on the following. i have a script that checks if a file exists:
if ; then
echo " Files exists"
else
echo " file not found"
fi
assuming the files does not exist ,, the script when run dusplays " file not found".. so far true. but when i... (2 Replies)
Discussion started by: sbk785
2 Replies
4. Shell Programming and Scripting
Hi All,
I have a parent shell script A and a child shell script B.
1). If a command i.e a mysqdump fails in shell script B fails then I trap the error with this code
if ]
then func_exit "Failed to export the cleaned DB1.${MYDBNAME} database to the ${MYARCHIVEDIR} directory"... (1 Reply)
Discussion started by: daveu7
1 Replies
5. Shell Programming and Scripting
Hi,
I created following script to check if file exist:
#!/bin/bash
SrcDir=$1
SrcFileName=$2
SrcTimePeriod=$3
if ;then
echo 1
else
echo 0
fi
I ran it like: /apps/Scripts/FileExist.sh /apps/Inbox file1 2nd_period_2010
Even file exist at that location, my above command is... (4 Replies)
Discussion started by: palak08
4 Replies
6. Shell Programming and Scripting
Hi,
How to check the status of tar command using bash script ?
I have the following tar command, how to check the status of the tar?
tar -cjf $today.tar.bz2 /opt/data
Regards,
Eye Gee (1 Reply)
Discussion started by: egkua
1 Replies
7. Shell Programming and Scripting
I am working on an Linux based application where I am using lp -onobanner -s -d$RPTDEST command to print the file on desired printer. Variable $RPTDEST could be different each time even for the same user. I need to implent the check if last print command was succesful or not, so that application... (3 Replies)
Discussion started by: dpmore
3 Replies
8. Shell Programming and Scripting
I have the below script to check whether directory is exist or not , now I sure the directory /abc NOT exist , but when run the script , it still pop the result is "the directory exist" , could suggest what is wrong ? thx
ll -d /abc > /dev/null 2>&1
if
then
echo "the directory exist !!"
... (7 Replies)
Discussion started by: ust
7 Replies
9. Shell Programming and Scripting
Hi folks,
I wrote a ksh program which run scripts from remote server.
To check the status code I wrote the following function:
check_remote_status()
{
status_code=`tail -1 $installLog`
if ] ; then
echo $errMsg | tee -a $installLog
exit 1
else
echo $validMsg >> $installLog
fi... (9 Replies)
Discussion started by: nir_s
9 Replies
10. Shell Programming and Scripting
Hi,
We have a text file which has the following data.
ISA~00~ ~00~ ~ZZ~VISTN ~ZZ~U1CAD ~051227~183
7~U~00200~000011258~0~P~<
GS~FA~EE05J~U1CAD~051227~1831~000011258~X~002002
ST~997~0001
AK1~SH~247
AK2~856~2470001
AK5~A
AK2~856~2470002
AK5~A... (3 Replies)
Discussion started by: isingh786
3 Replies