I have the following bash code which I want to run within a perl script. As a bash script the code runs without any error. But in the perl script it gives the error: Bad name after bash' at ./061_rewrite_aws.pl line 48.
system(' 'bash' '-c' <<'END_SHELL_CODE';
AWS_Base="/run/user/1000/gvfs/smb-share:server=192.168.0.205,share=zmd-backup"
pushd /home/zmd/AWS/AWS_DataDirs
cp -R $AWS_Base/* ./
popd
'END_SHELL_CODE' ');
Assistance will be appreciated
bash AWS_Base="/run/user/1000/gvfs/smb-share:server=192.168.0.205,share=zmd-backup"; pushd /home/zmd/AWS/AWS_DataDirs cp -R $AWS_Base/* ./; popd;