• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Shell and Perl scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shell and Perl scripts


  • Subject: Shell and Perl scripts
  • From: Paul FitzGerald <email@hidden>
  • Date: Fri, 6 May 2005 18:45:13 -0700

I'm trying to use Automator to tie together a process that I currently do that involves some Applescripts, shell and perl scripts. I've come upon a problem that I'm not sure how to resolve. I can make the scripts work if I hard code some full paths but I can't seem to find a way to make them work with default paths. I have some test scripts (below) that demonstrate the problem better than I can explain. If I run the shell script from a terminal window I can make it work since it has a concept of a current directory. But called from Automator it has issues.

I start with a folder named "xxx" on my desktop and run the shell script test.sh.
Both the shell script and the perl script are in a folder, also on my desktop, named "process" along with the Automator workflow.


test.sh
# This mv command works as expected, renaming the folder to the name passed in as an argv.
mv ~/Desktop/xxx ~/Desktop/$1
# Calling the perl script as below does not work. It can't find the perl script.
perl test.pl ~/Desktop/$1
# If I use a path to the perl script the script will run and receive the argv as expected.
perl ~/Desktop/process/test.pl ~/Desktop/$1



Thoughts? anyone?

Paul FitzGerald
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Shell and Perl scripts
      • From: Christopher Nebel <email@hidden>
  • Prev by Date: Re: Building a Xcode project
  • Next by Date: Re: Shell and Perl scripts
  • Previous by thread: Ordering actions
  • Next by thread: Re: Shell and Perl scripts
  • Index(es):
    • Date
    • Thread