Thanks olded
Will need just a further help.
Here is what my script(getdata.sh) is.
It take comma separated filesystem names as input parameter.It should return the same comma separated space usage(%) data for those filesystems
-------start------------
#!/bin/ksh
filesystems=$1
OFS=$IFS
IFS=","
set -A arr $(echo "$filesystems")
IFS=$OFS
echo ${arr[*]}
#browse through the filesystems and get the %space used
i=0
while [[ $i -lt ${#arr[*]} ]]
do
echo ${arr[$i]}
filesystem=${arr[$i]}
spaceusage=`df -k|grep $filesystem|cut -d" " -f5,5,8`
${arr[$i]}=$spaceusage
echo ${arr[$i]}
let i=i+1
done
---------------end---------------
i run this file named getdata.sh with
$./getdata.sh /eai01,/eai02
I get some syntax error when i run this
./getdata.sh[44]: /eai01=: not found
I am also not getting "df -k|grep $filesystem|cut -d" " -f5,5,8" command right here.It does not return the % usage in all the cases.
See what all can u help here.
Thanks,
-Sourabh