03-11-2018
Whenever you start a thread in this forum it is a good idea to tell us what operating system and shell you're using.
We could be lazy and say that you should rewrite abc.sh to do what it is supposed to do and exit instead of looping forever, but since we have no idea what it is supposed to do, this might not be possible.
If abc.sh runs forever, it is not possible to write a script that runs it and then checks the contents of a file. One could start it asynchronously and occasionally check its output file, but since you haven't told us what output file(s) it creates nor what output you're hoping to find, it is hard for us to guess at how to do that.
If you showed us the contents of abc.sh (in CODE tags), showed us the output it produces (in CODE tags), and showed us the email you're hoping to produce (in CODE tags); we might have a much better chance of helping you.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How to send an error mail from a shell script
e.g.
mail destination_adr@blabla.int "Message : here an error message "
thanks, Ann. (1 Reply)
Discussion started by: annelisa
1 Replies
2. Shell Programming and Scripting
Hi,
I need a shell script which runs in the backround for all the 24 hours and send a mail to us regarding the output of the prstat command when the load average increase above certain percent.
kindly help me on this...... (1 Reply)
Discussion started by: jayaramanit
1 Replies
3. Shell Programming and Scripting
Hi ,
I need to prepare a script which will check my database with specific to particluar table. If the row count exceeds a certain limit, i need to send a mail to a set of Recipients.
Being new to unix, please guide me to complete this task.
Advance thanks,
Sekar. (4 Replies)
Discussion started by: Sekar1
4 Replies
4. Shell Programming and Scripting
how to run a script using cron job and send the output as attachment via e-mail using unix. please help me.
how my cron job entry should be?
As of now my cron job entry is to run the script at specific time,
15 03 * * * /path/sample.sh | mail -s "Logs" email_id
In the above entry, what... (8 Replies)
Discussion started by: vidhyaS
8 Replies
5. Shell Programming and Scripting
Thanks again for helping me out.
I was wondering if anyone else has encountered this issue.
I have a SQL script that produces a list -however we are only interested in that list if the length is not zero
Here is the sql file named dailyBalance.sql
select * from Balance where... (1 Reply)
Discussion started by: Astrocloud
1 Replies
6. Shell Programming and Scripting
Hi Guys,
I am not Good at scripting.
I need to write a script such that if output of command shows the particular word in output then send mail to abc@compay.com
-bash-3.2$ ps -ef | grep bpbkar
root 6040 1 0 13:05:19 ? 0:00 bpbkar -r 2678400 -ru root -dt 47395 -to 0... (20 Replies)
Discussion started by: manalisharmabe
20 Replies
7. Shell Programming and Scripting
I want to send a mail through shell script,If it is possible Please give me a code.
mail id : upload.xxx@example.com (8 Replies)
Discussion started by: kannansoft1985
8 Replies
8. Shell Programming and Scripting
HI Guys,
I am writing one shell script to send the mail alert to some email id's if the file not modified in last 10 mins but its not working, I believe MTIME is null string is wrong . can you please assist me on this.
script :-
filename="abc.txt"
echo "Filename is $filename"... (1 Reply)
Discussion started by: abhigrkist
1 Replies
9. Shell Programming and Scripting
Hi all, I'm new to shell script
i wrote some shell script for my colleague, everyone is fine,except on user
we are using VNC viewer to work
and there are some script start with shebang #! /bin/csh
there is an user will not terminate after running the script even if a hello world
i need... (5 Replies)
Discussion started by: pilistar0222
5 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 OSX
shasum5.12
SHASUM(1) Perl Programmers Reference Guide SHASUM(1)
NAME
shasum - Print or Check SHA Checksums
SYNOPSIS
Usage: shasum [OPTION] [FILE]...
or: shasum [OPTION] --check [FILE]
Print or check SHA checksums.
With no FILE, or when FILE is -, read standard input.
-a, --algorithm 1 (default), 224, 256, 384, 512
-b, --binary read files in binary mode (default on DOS/Windows)
-c, --check check SHA sums against given list
-p, --portable read files in portable mode
produces same digest on Windows/Unix/Mac
-t, --text read files in text mode (default)
The following two options are useful only when verifying checksums:
-s, --status don't output anything, status code shows success
-w, --warn warn about improperly formatted SHA checksum lines
-h, --help display this help and exit
-v, --version output version information and exit
The sums are computed as described in FIPS PUB 180-2. When checking,
the input should be a former output of this program. The default mode
is to print a line with checksum, a character indicating type (`*'
for binary, `?' for portable, ` ' for text), and name for each FILE.
DESCRIPTION
The shasum script provides the easiest and most convenient way to compute SHA message digests. Rather than writing a program, the user
simply feeds data to the script via the command line, and waits for the results to be printed on standard output. Data can be fed to
shasum through files, standard input, or both.
The following command shows how easy it is to compute digests for typical inputs such as the NIST test vector "abc":
perl -e "print qw(abc)" | shasum
Or, if you want to use SHA-256 instead of the default SHA-1, simply say:
perl -e "print qw(abc)" | shasum -a 256
Since shasum uses the same interface employed by the familiar sha1sum program (and its somewhat outmoded anscestor md5sum), you can install
this script as a convenient drop-in replacement.
AUTHOR
Copyright (c) 2003-2008 Mark Shelor <mshelor@cpan.org>.
SEE ALSO
shasum is implemented using the Perl module Digest::SHA or Digest::SHA::PurePerl.
perl v5.12.5 2013-08-25 SHASUM(1)