The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Include PERL script with in the unix shell script ganapati UNIX for Dummies Questions & Answers 1 04-29-2008 01:18 PM
How to include RETURN KEY with Background process "&" in Shell Script racbern Shell Programming and Scripting 1 03-11-2008 07:30 AM
how to include spreadsheet::ParseExcel in shell script akash Shell Programming and Scripting 1 01-10-2008 11:17 AM
How to include shell script in C program mridula High Level Programming 5 07-30-2006 04:13 AM
Difference between writing Unix Shell script and AIX Shell Scripts haroonec AIX 0 04-12-2006 03:27 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 03-17-2009
worchyld worchyld is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 27
How to include shell scripts in one big shell script?

I am wanting to create one shell script which I run, as I want it to run a series of other shell scripts and PHP scripts in sequence. But, I am not sure how to include shell scripts.

Note: Paths changed for security/aesthetic reasons.


Code:
 
#!/bin/sh  
# FILE: '_final.sh' -- a list of shell scripts and php files to run. 
sh /path/to/delete.sh 
# 
# Just ignore these following lines for the moment 
#sh /path/to/mycronjobs/unzip.sh 
#php /path/to/mycronjobs/ci_cron.php --run=/cron/run/ --show-output 
#sh /path/to/mycronjobs/mysql_import.sh #php /path/to/mycronjobs/ci_cron.php --run=/cron/removeBlankRows/ --show-output

The problem is that whenever I try to run this on the command line it complains that:

Quote:
: No such file or directorynal.sh: line 4: /path/to/mycronjobs/delete.sh
I do not know why it keeps saying "directorynal.sh" for.

I've looked on Google, the most I got was that I am meant to either use the 'source' command or the '.' command, but without explanation of how to use it. I tried both of the following;


Code:
 
#!/bin/sh  
. /path/to/delete.sh 
source /path/to/delete.sh

But I still get the same result/error.

Can someone enlighten me, how do I include the shell scripts? Is there an include function or something?

Thanks.
 

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 09:43 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