Hi ALL,
i am so much confused y the following script is not working in the korn shel which works in bash shell. please solve the error that i am facing.
i want to extract the format of the size from a variable i.e. GB or KB or MB or B or BYTES
code:
--------
size_dir_pass=1.2gb
size1=`expr $size_dir_pass | sed 's/[\.0-9]//g'`
echo "size1" $size1
size1 value is not printing ... please help me ...
Error :
Usage : expr expression
Thanks in advance
kamal