Computing.Net > Forums > Programming > Shell script to Display status

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Shell script to Display status

Reply to Message Icon

Name: Madhugopal
Date: March 14, 2009 at 14:09:38 Pacific
OS: solaris
Subcategory: Opinions
Comment:

Hi . Im a DBA i dont much knowledge about
shell scripting can anybody help me out in my
requirement .
i have output file like below :
<SID> dif0 online backup at 200903100758.
Exit code: 0.

If the output file returns exit code 0 then its
success if not failled
My requirement is to display the backup
status with backup date <Mar 10 2009>
Something like below
if exit code 0 it should return
Mar 10 2009 Backup success
else
Mar 10 2009 backup failled
My try on the requirement :
j=0.
i=`more <logname>|grep dif*|tail -01 |awk ' {
print $9 }'`
if [ $i=$j ]
then
print "Backup success"
else
print "Backup failled"
fi

This gives me backup success or failure but
without date . im not able to interpret the date
in to <month date year> bec the date in the
log contains time of completion .

Can anybody HELP me .



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Shell script to Display status

transfering shell script to windows www.computing.net/answers/programming/transfering-shell-script-to-windows/3681.html

shell script to delete duplicate www.computing.net/answers/programming/shell-script-to-delete-duplicate/18130.html

Shell script to obtain user details www.computing.net/answers/programming/shell-script-to-obtain-user-details/18647.html