http://www.perlmonks.org?node_id=975998


in reply to Getting error while executing the script

I'm confused... where's the Perl code? I see a shell command line and I see you executing a Perl script called "diskusage.pl" but I don't see the code for that script.

if this:

df -h $FILESYSTEM -exec | grep -v "Filesystem" | sed -e "s/%//g"|awk ' +{print $5}'
is what is tucked inside of diskusage.pl then it has now way of working at all. But I suspect there's more to this... supply the full (or enough of) code you're trying to run.

simply looking at what you've provided as a command line as a -sh script I'd say that your problem starts with the "-exec" prior to the pipe.

Based on the cited error you are not even invoking the Perl interpreter at all...


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg