in reply to Re: How to execute alias commands (source your profile)
in thread How to execute alias commands

Thank you for the reply. I liked the idea of using shell scripts as aliases. I've added /mybin to my path and I am able to execute the script successfully with argument values from the command line. However, when I execute it with perl, the argv values do not get passed.
if($input eq "-c"){ print "Enter Command: "; my $cmd = <STDIN>; chomp($cmd); print $fh $cmd; print $fh "\n\t#### START COMMAND OUTPUT ####\n"; print `$cmd`; foreach(`$cmd`){ print $fh "#".$_; } print $fh "\t#### END COMMAND OUTPUT ####\n"; next; }
Shell Script:
#!/bin/bash perl /path/to/script/script.pl $1 $2 $3 $4
Any suggestions?

Replies are listed 'Best First'.
Re^3: How to execute alias commands (source your profile)
by nanophd (Novice) on Jan 14, 2014 at 17:15 UTC
    Never mind. I fell victim of my own stupidity. I was editing the wrong version of the script. Everything seems to be working perfectly.

    Thank you again!