Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support invoke one script based on previous script execution Post 302550750 by psshah on Saturday 27th of August 2011 02:56:03 AM
Old 08-27-2011
Issue 1:
Put space between "[" and "$"; something like below:
Code:
 if [[ ${rc} -eq 0 ]]

Issue 2: Syntax for mail command is not correct.
This may vary depending upon type of OS. First try sending mail from command prompt, after that update proper syntax in script.

I hope this would help.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to invoke shell script

hi everybody, i learning unix now only.Can u pls guide me in invoking a shell script.Actually i need to know how to write the command for invoking the shell script.Suppose the shell file name is count , then how i will write the command. thanks (1 Reply)
Discussion started by: gopa_mani
1 Replies

2. Shell Programming and Scripting

invoke same script twice

hey, can I invoke the same script twice simultaneously? I want both instances to run at the same time with different parameters. Thanks! (2 Replies)
Discussion started by: mpang_
2 Replies

3. Shell Programming and Scripting

Invoke script depending on previous scripts

Hi, I am in desperate needs for advice! I have a script which would invoke various java programs depending on the input parameter and a script which would perform calculation on the data inputted by the first script. The schedule of the job is like this 1) 10:00 am to 11:00 am: call java... (0 Replies)
Discussion started by: mpang_
0 Replies

4. Shell Programming and Scripting

Invoke shell script in cgi script

Hi, I just tried to call a simple shell script from a cgi script writing in c programming.But,it is not working.i will be grateful if anyone can show me the problems going on as i m new to c and oso shell script.Thanks. -Here is my shell script of call the 'pc shut down' system command in... (1 Reply)
Discussion started by: carolline
1 Replies

5. Shell Programming and Scripting

Not able to invoke a sh script from KSH

Hi all, Iam writing a KSH script which needs to export dispaly to Xwindows and then involke a sh script .. But a core file is getting genrated for reasons not known to me. Please check i need incorporate below mentioend code in my script which iam not abel to .. export DISPLAY=`who am i |... (1 Reply)
Discussion started by: rahman_riyaz
1 Replies

6. Shell Programming and Scripting

Automatically Rerun a script based on previous execution output

Hi Experts, I have a shell script called "updatevs" that is scheduled to run at 6.00 am everyday via cronjob. The cronjob will execute this script and output to a log file. The functionality of this script is to read the database and run a set of commands. This script is generally successful... (6 Replies)
Discussion started by: forumthreads
6 Replies

7. Shell Programming and Scripting

Awk script to create new file based on previous line

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

8. UNIX for Advanced & Expert Users

Invoke unix script using c program

hi i want to invoke a unix script in a C program and also return some value from the script to the C program to use that value further. Basically i am doing a Lookup operation in this unix script and returning the looked up data from a oracle database table.. please help me invoke as well... (1 Reply)
Discussion started by: somi2yoga
1 Replies

9. Shell Programming and Scripting

Improve script made to calculate value based on present and previous line

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

10. Shell Programming and Scripting

Depend on Script message needs to be invoke anothe script

I have script below #! /bin/bash if then echo "JBoss is NOT running" else echo "JBoss is running" fi If JBoss is NOT running need to be invoke another script i.e jboss startup script /home/vizion/Desktop/jboss-4.2.3.GA/bin/run.sh script from other script not... (5 Replies)
Discussion started by: Chenchireddy
5 Replies
REWRITE(6)							   Games Manual 							REWRITE(6)

NAME
rewrite - mail rewrite rules SYNOPSIS
/mail/lib/rewrite DESCRIPTION
Mail(1) uses rewrite rules to convert mail destinations into commands used to dispose of the mail. Each line of the file is a rule. Blank lines and lines beginning with # are ignored. Each rewriting rule consists of (up to) 4 strings: pattern A regular expression in the style of regexp(6). The pattern is applied to mail destination addresses. The pattern match is case- insensitive and must match the entire address. type The type of rule; see below. arg1 An ed(1) style replacement string, with standing for the text matched by the nth parenthesized subpattern. arg2 Another ed(1) style replacement string. In each of these fields the substring s is replaced by the login id of the sender and the substring l is replaced by the name of the local machine. When delivering a message, mail starts with the first rule and continues down the list until a pattern matches the destination address. It then performs one of the following actions depending on the type of the rule: >> Append the mail to the file indicated by expanding arg1, provided that file appears to be a valid mailbox. | Pipe the mail through the command formed from concatenating the expanded arg1 and arg2. alias Replace the address by the address(es) specified by expanding arg1 and recur. translate Replace the address by the address(es) output by the command formed by expanding arg1 and recur. Mail expands the addresses recursively until each address has matched a >> or | rule or until the recursion depth indicates a rewriting loop (currently 32). If mail(1) is called with more than one address and several addresses match | rules and result in the same expanded arg1, the message is delivered to all those addresses by a single command, composed by concatenating the common expanded arg1 and each expanded arg2. This mail bundling is performed to reduce the number of times the same message is transmitted across a network. For example, with the following re- write rule ([^!]*.att.com)!(.*) | "/mail/lib/qmail 's' 'net!1'" "'2'" if user presotto runs the command % mail research.att.com!ken research.att.com!rob there will follow only one execution of the command /mail/lib/qmail presotto net!research.att.com ken rob Here /mail/lib/qmail is an rc(1) script used for locally queuing remote mail. In the event of an error, the disposition of the mail depends on the name of the command executing the rewrite. If the command is called mail and is run by $user, the command will print an error and deposit the message in /mail/box/$user/dead.letter. If the command is called rmail, usually because it was invoked to deliver mail arriving over the network, the message will be returned to the sender. The returned message will appear to have been sent by user postmaster. SEE ALSO
mail(1) REWRITE(6)
All times are GMT -4. The time now is 07:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy