The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 09:27 AM
Box A's perl script calling box B's shell script new2ss Shell Programming and Scripting 1 09-13-2006 06:17 AM
calling dos2unix on shell script from within the script vino Shell Programming and Scripting 4 04-08-2005 03:38 AM
Calling a script from another dnkansah Shell Programming and Scripting 5 09-02-2004 07:02 AM
Calling C from within a csh script barisgultekin Shell Programming and Scripting 2 05-24-2002 09:21 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-27-2007
madhu_aqua14 madhu_aqua14 is offline
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
  #2 (permalink)  
Old 02-27-2007
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,944
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
  #3 (permalink)  
Old 02-27-2007
preetam preetam is offline
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"
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0