I am a beginner to perl scriptting.I have written a script to find the disk usage.When i try to execute the below command from command line I'm getting the required output
df -h $FILESYSTEM -exec | grep -v "Filesystem" | sed -e "s/%//g"|awk '{print $5}'But when i try to execute the same in script i'm receving the below exception
Please guide me.bash-2.05$ ./diskusage.pl The Operating System is SunOS Enter the filesystem related to SUN /u001 sh: syntax error at line 2: `|' unexpected
In reply to Getting error while executing the script by arunkarthick
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |