The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
calling a script from a level above where the script resides SummitElse UNIX for Advanced & Expert Users 2 10-26-2007 06:27 AM
Box A's perl script calling box B's shell script new2ss Shell Programming and Scripting 1 09-13-2006 03:17 AM
calling dos2unix on shell script from within the script vino Shell Programming and Scripting 4 04-08-2005 12:38 AM
Calling a script from another dnkansah Shell Programming and Scripting 5 09-02-2004 04:02 AM
Calling C from within a csh script barisgultekin Shell Programming and Scripting 2 05-24-2002 06:21 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 02-27-2007
Registered User
 

Join Date: Feb 2007
Posts: 16
calling a script from another

hi ...


i need to call a unix script depending up on some condition from a unix script which is already running.


please help
Reply With Quote
Forum Sponsor
  #2  
Old 02-27-2007
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,610
this had been answered many times,

please search the forum


Code:
#! /bin/zsh

i=1
while [ $i -lt 10 ]
do
  /anotherdir/anotherscript
  i=$(($i + 1))
done

exit 0
Reply With Quote
  #3  
Old 02-27-2007
Registered User
 

Join Date: Feb 2007
Posts: 5
Thumbs up

#!/bin/bash

#let 'copy' is ur unix script u want to call from this program if sendmail
#service is enabled in ur system

${Mail:=`ps -ef | grep sendmail| grep -v "grep"`}

if [ $? -eq 0 ] ; then
copy #executable present in the same directory
else
echo "service not enabled"
fi

echo "bye"
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:18 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0