How to use shell variables in perl command call in a bash shell script?
I have a perl command in my shell script to evaluate date -1.
How can i use $myDate
in perl command call?
This is the section in my script:
myDate='10/10/2012'
Dt=$(perl -e 'use POSIX;print strftime '%m/%d/%y', localtime time-86400;")
I want use $myDate
in place of %m/%d/%y
.
Any help will be appreciated.
Thank you.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…