Perl Command Line Examples

df -k . output:
Filesystem            kbytes    used   avail capacity  Mounted on
nas03:/vol/vol38/db_data                     943718400 759145092 184573308    81%    /mounts/db_data
To extract the Nas Host Name and Volume Name for use in a shell script:
NASHOST=`df -k . | perl -ne '/^(.*):/ && print "$1"'`
VOLUME=`df -k . | perl -ne '/\/vol\/([a-z]*[0-9]*)/ && print "$1"'`