@hiten11 A little late but please be aware LinuxQuestions has a dedicated Forum for Solaris related questions
here.
In any case, note that there is a very simple way to make your original script working almost as is on Solaris. Just add the following line as first instruction, just after the shebang:
Code:
PATH=$(getconf PATH):$PATH
and that's it. This command is setting the PATH for the shell and other commands to run POSIX compliant utilities. Under Solaris, POSIX compliant utilities are not necessarily the default ones. After setting the PATH, the df and awk commands will behave the way you expect.
You script would still be non portable as it uses bashisms but this is not a problem as Solaris has been bundling bash since more than a decade.