MACSCRPT Archives

July 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
John Baxter <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Mon, 24 Jul 2006 12:16:10 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
On Jul 24, 2006, at 10:33 AM, Duane Mitchell wrote:

>
> I've got a script that contains a short "do shell perl ..." line in  
> it. I run the line from the Terminal and it works. I save the  
> script as an application and double-click it and it works. I have  
> crontab launch the script application and I get an error message:  
> "sh: line 1: perl: command not found"
>
> I checked the env info for the current logged in user and the path  
> to perl is included. I'm stumped...suggestions anybody...thanks.

cron runs crontab things with a very limited environment.  It is  
likely that perl isn't in any of the (few or none) directories in  
that environment's PATH variable.

The command
which perl
executed in terminal shows that Apple--as is common--has perl in
/usr/bin/perl

It sounds as if you have the short perl script in your command line  
using -e 'blah'...if so use /usr/bin/perl in place of perl.  If you  
have an actual perl source file, use
#!/usr/bin/perl
rather than
#!perl
as its first line.

"They" do this to help us.

   --John

ATOM RSS1 RSS2