AmitBAcharya
asked on
Can we use alias in a perl script
Hi
I have an alias 'push_hermes' defined under /home/www/.bashrc -
alias push_hermes='cd ~/supervision/hermesAdmin; perl runLandSiteAdminWithAction .pl $*'
While I am trying to use this alias in a perl script -
system ("push_hermes $site_name $project_name push"), the system() command doesn't seem to recognise the push_hermes alias.
As a work around, I discontinued the use of the alias and made it inline in the perl script and it is working now. But I wanted it know, if it is possible to use an alias in the perl script?
Regards
I have an alias 'push_hermes' defined under /home/www/.bashrc -
alias push_hermes='cd ~/supervision/hermesAdmin;
While I am trying to use this alias in a perl script -
system ("push_hermes $site_name $project_name push"), the system() command doesn't seem to recognise the push_hermes alias.
As a work around, I discontinued the use of the alias and made it inline in the perl script and it is working now. But I wanted it know, if it is possible to use an alias in the perl script?
Regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the info guys!
ASKER
Can you provide a syntax of it?