|
why this script is running in bash but not in perl
A script that will show system time,language&country information and system information.
Dear All I have written the following small script in bash it is running successfully.
#!/bin/bash
date
uname -a
cat /etc/sysconfig/clock | grep ZONE
locale | grep LANG
But when i am writing the same script in PERL the
" cat /etc/sysconfig/clock | grep ZONE"-- this line is not executing and showing sh: /etc/sysconfig/clock: Permission denied in the screen.The other three lines are executing successfully.
I made chmod + x prog.name before executing the script and I also tried to run the script as a regular and root user.But in both cases the o/p are same. If there is any modification can be made to the script to work in more details pls give that suggestion also.
Thanks & Regards
Anirban.
|