hi
I am try to run following script using c-shell but i get the following syntex error:-
----script---
---------------------------------------------------------------------------------
#!/bin/csh
echo "system monitor"
echo "
1) system paging
2) system file inf.
3) system disk inf.
4) current operating system.
5) print report
"
echo "select an option"
read choice
switch ($choice)
case 1:
sar -p 5
breaksw
case 2:
sar -u 5
breaksw
case 3:
diskusage -p
breaksw
case 4:
uname -a
breakesw
case 9:
breaksw
default:
echo 'Invalid choice'
breaksw
endsw
------------------------------------------------------------------------------------
sunserver% sh monitor
system monitor
1) system paging
2) system file inf.
3) system disk inf.
4) current operating system.
5) print report
select an option
5
monitor: syntax error at line 12: `switch' unexpected ----------------------------------------------------------------------------