Wednesday, 11 January 2017

Export Bash Variable for Perl Command One-liner

How to use shell variables in perl command call in a bash shell script?

mydate=10/10/2012
export mydate
perl -e 'print "my date is $ENV{mydate}\n"'

No comments:

Post a Comment