Im trying to execute a perl script from a shell script. I have to pass the path of a file in the command line when i execute the perl script (Automate the perl script execution). How do i feed the path to the perl script through the shell script?
Details of the perl script execution:
$perl sample.pl
Enter the filename:
Details of the unsuccessful shell script:
#!bin/sh
/usr/bin/perl /home/name/sample.pl<< "<pathname"
I dont want to hardcode the path. But i tried passing the path of the file using << in the shell. It didnt work. Please help me.
Details of the perl script execution:
$perl sample.pl
Enter the filename:
Details of the unsuccessful shell script:
#!bin/sh
/usr/bin/perl /home/name/sample.pl<< "<pathname"
I dont want to hardcode the path. But i tried passing the path of the file using << in the shell. It didnt work. Please help me.
Comment