shell script help
Hi to all,
I badly need some help with this. How do I write a shell script version of some C code I wrote? The basic idea is as follows:
variable x is given the value of 1 at start in script. When it goes down the function, I want it to retain the value at which the program terminated when it first ran so that when the program runs a second time, it takes the last value that x got assigned (that is either a 0 or a 1).
if(x==1)
{
printf("Good Morning!!");
x=0;
}
else
if(x==0)
{
printf("Good Afternoon!!");
x=1;
}
Thx in advance..
Regards,
Visham
|