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 > 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 12: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 03:13 AM
Difference between writing Unix Shell script and AIX Shell Scripts haroonec AIX 0 04-12-2006 02:27 AM

Closed Thread
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
  #1 (permalink)  
Old 03-18-2009
worchyld worchyld is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 27
I've got rid of the delete.sh file for the moment to see if the final.sh file will work.

But I get a really weird error.

Code:
(COMMANDPROMPT)> sh ~/mycronjobs/final.sh
Quote:
// This is the output

Archive: /path/to/inbounddata/traveldata.zip
inflating: /path/to/inbounddata/data/2009-03-18/traveldata.csv [text]
: command not foundjobs/final.sh: line 2:

Truncated `offers` table
`/path/to/mycronjobs/my_custom_sql.sql` exists
Deleted: `/path/to/mycronjobs/my_custom_sql.sql`
Start writing custom mysql file
Finished writing custom mysql file
Why does it say:

Quote:
: command not foundjobs/final.sh: line 2:
There is nothing wrong with line 2. If I get rid of line 3 (the php one) there are no errors returned.

Code:
#!/bin/sh 
sh /path/to/mycronjobs/unzip.sh;
php /path/to/mycronjobs/ci_cron.php --run=/cron/run/ --show-output;
  #2 (permalink)  
Old 03-18-2009
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,361
Quote:
Originally Posted by worchyld View Post
Why does it say:

Code:
: command not foundjobs/final.sh: line 2:

You have carriage returns in your script file; remove them.

If you have the dos2unix command, use it. If not:

Code:
tr -d '\r' < ~/mycronjobs/final.sh > temp &&
mv temp ~/mycronjobs/final.sh
  #3 (permalink)  
Old 03-18-2009
worchyld worchyld is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 27
Oh Okay.

Many thanks! I appreciate your help!

I don't have dos2unix. I tried doing a whereis -- but it doesn't appear to be there.

Anyway,

I tried;

Code:
tr -d '\r' < ~/mycronjobs/final.sh > temp &&
mv temp ~/mycronjobs/final.sh
And then ran the final.sh file

And it worked fine -- no errors like I mentioned before.

Thanks!

Last edited by worchyld; 03-18-2009 at 12:17 PM..
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 08:23 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