How to perform var++ task in shell script?
Hi..i've a script in which i want to increase value by 1 of a variable and then assign it back to same variable..
For example: flag=flag+1 how to do that? Code:
flag=1 |
Code:
flag=1 http://rute.2038bug.com/index.html.gz http://tldp.org/LDP/Bash-Beginners-G...tml/index.html http://www.tldp.org/LDP/abs/html/ |
Thanks it worked..:)
One more question here i am trying to display system processes every 30 seconds but using echo the output is not coming line by line..can you tell me how to do that? like what we see in normal execution of ps -ef in shell. |
I don't quite understand why you use the echo command at all, why don't you use the ps command directly?
|
As per TobiSGD; no need to use 'echo', just use the 'ps -ef' directly.
|
Yes..thanks..silly mistake.
|
All times are GMT -5. The time now is 11:40 AM. |