06-30-2009
Arun,
Thanks again. The wrapper script seems to work with out any error messages however it does not produce any email. Here is what i did:
changed the sleep value to 30 in Wrapper so i need not have to wait long to see the eamil.
Ran wrapper.
wrapper seems to execute updatevs script successfully but i was expecting wrapper script to display the message "completed successfully".
commented sleep in wrapper, I modified "updatevs" script to ensure it fails hoping the wrapper to send an email but wrapper does not send any mail.
The mailx command does send out an email when this command is run on its own.
Please can you see where i am going wrong.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello,
When I run a script, the script sometimes exited. I need to re-run it automatically again. Currently I am using crontab to run the script each 5 minutes. However, I need to have a better solution.
Any idea what to do?
thanks (3 Replies)
Discussion started by: melanie_pfefer
3 Replies
2. Shell Programming and Scripting
Hi all,
I'm doing automation task for my team and I just started to learn unix scripting so please shed some light on how to do this:
1) I have 2 sets of datafiles - datafile A and B. These datafiles must be loaded subsequently and cannot be loaded concurrently.
2) So I loaded datafile A... (10 Replies)
Discussion started by: luna_soleil
10 Replies
3. Shell Programming and Scripting
Hi Experts,
I have a script called test.sh. I am trying to execute it with sh -x test.sh. Where i can find sequence of steps executed one by one. Now i want to these executions to be captured in a file.
i.e sh -x test.sh > output.txt
the above one is notworking.
can anyone help me... (6 Replies)
Discussion started by: naree
6 Replies
4. Shell Programming and Scripting
Need help creating a script that does the following:
Sort a file
Compare the previous line "last field" with current line "last field"
If they are the same, print output to a file
If they are different print output to a new file
The script should keep creating new files if the previous... (5 Replies)
Discussion started by: Muga801
5 Replies
5. Shell Programming and Scripting
Hi all,
I have made at small script to make a simple calculation on a file which is formatted in this way:
I want to create a new file in which the value of particular line minus the previous line is printed.
So my wanted output is:
I have made the following program to do the job... (5 Replies)
Discussion started by: s052866
5 Replies
6. Emergency UNIX and Linux Support
I am database guy and not very good at shell scripts. I am seeking help to sharp my script coding. I have 5 scripts
1. master script. I use this one to call other four scripts to do database work.
2. db_backup_1 and log_backup_1
3. db_backup_2 and log_backup_2
in master script, I want to... (4 Replies)
Discussion started by: duke0001
4 Replies
7. Shell Programming and Scripting
How to see the output from remote server during execution of a script ?
I am executing a script (ls) from machine 1 but the o/p should be displayed in machine 2. Can I achieve this ?
Example:-
Machine 1:-
# ls
Machine 2:- (console)
file1 file2 file 3
dir1 dir2 (0 Replies)
Discussion started by: frintocf
0 Replies
8. Shell Programming and Scripting
I want to create a script that will zip the previous log.
Example.
abc.log.2012.12.02
abc.log.2012.12.01.gzip
abc.log
If today is 2012.12.03 , my current log is abc.log and my previous date is 2012.12.02, i want abc.log.2012.12.02 to compress everytime I run the script.
I can... (5 Replies)
Discussion started by: kaibiganmi
5 Replies
9. UNIX for Advanced & Expert Users
Hello All i have a KSH script which basically takes attribute name as input argument and searches whole Netezza appliance and prints information of where that column is used (Table/Views) etc.
Problem with this approach business users have to raise SUDO access request, Install Putty, run through... (1 Reply)
Discussion started by: Ariean
1 Replies
10. Shell Programming and Scripting
Hello Team .
I am working a health check script ( bash) to run on linux server ( RedHat) and requirements are
1. The o/p of script need to be send to two diff files . I am testing with tee command . But I am not successful yet , any recommendations if that is the right approach ?
2. The same... (2 Replies)
Discussion started by: Varja
2 Replies
LEARN ABOUT DEBIAN
shunit2
SHUNIT2(1) SHUNIT2(1)
NAME
shunit2 - A unit test framework for shell scripts
SYNOPSIS
shunit2 unitfile
DESCRIPTION
shUnit2 is a xUnit unit test framework for Bourne based shell scripts, and it is designed to work in a similar manner to JUnit, PyUnit,
etc.. If you have ever had the desire to write a unit test for a shell script, shUnit2 can do the job.
You can either run shunit2 directly from the commandline and specify the unit file or directly source the shunit2 executable.
If you directly execute shunit2 and don't specify a unitfile shunit2 assumes a empty testfile and will return without an error message.
EXAMPLE
Simple script to test if 1 equals 1
#! /bin/sh
testEquality()
{
assertEquals 1 1
}
# load shunit2
. shunit2
Execute shUnit2 unit tests directly from the commandline
shunit2 /path/to/unit/file
OPTIONS
shunit2 does not support any commandline options at all. You can either source shunit2 to execute your unit tests or directly run shunit2
as a commandline script.
SEE ALSO
For more information see http://code.google.com/p/shunit2/ or have a look at the installed documentation in /usr/share/doc/shunit2/
AUTHOR
shunit2 was written by Kate Ward <kate.ward@forestent.com>. This manpage was written by Ulrich Dangel <mru@spamt.net>.
2.1.6 03/25/2012 SHUNIT2(1)