• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

pel, how to pass a parameter to a shell program

#!/usr/bin/perl

$MYDIR = `pwd`;

#How do I pass $MYDIR to my shell script.
`.\myshellscript.sh`;
0
rgbcof
Asked:
rgbcof
1 Solution
 
TintinCommented:

system "/path/to/myshellscript.sh $MYDIR" and die $!;

Open in new window


or

system "/path/to/myshellscript.sh",$MYDIR and die $!;

Open in new window

0
 
rgbcofAuthor Commented:
That's great.  Thanks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now