Hello, Well I am working for first time in C-shell so please be "kind" with my potentially idiot question... My job is to make a script that according the date (sysdate) checks the logs... I stuck in the if syntax ... I don't know why but this simple code that checks the first argument of the user is not working..
Here is the code...
9 if ($1=="s") then
10 echo "seconds";
11 else if ($1=="d") then
12 echo "days";
13 else if ($1=="h") then
14 echo "hours";
15 else if ($1=="m") then
16 echo "minutes";
17 else
18 echo "Wrong argument";
19 endif
This is a testing part through which i try to solve the problem (that's why it has so many echo)... it finishes with this error...
if: Expression Syntax. at the first if.
Thanx in advance...
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity." -- Dennis Ritchie