Search Results

Search: Posts Made By: navienavnav
3,804
Posted By navienavnav
Okay. Thanks again.
Okay.

Thanks again.
3,804
Posted By navienavnav
Thank you for your time but if you would read my...
Thank you for your time but if you would read my last post carefully and not skim over it... you'd see that I said "except for loop" which implies that I already know how to do it with a for loop...
3,804
Posted By navienavnav
If bourne shells doesn't have math then how am I...
If bourne shells doesn't have math then how am I able to execute statements like var=$(($1-1))

And is it possible to find x to the power of y using expr function (or in any possible way in bourne...
3,804
Posted By navienavnav
Confusion about FOR LOOP syntax between Bourne and BASH shell. Please see.
for (( i=1; i<=3; i++ )); do
for (( j=1; j<=3; j++ )); do
for (( k=1; k<=3; k++ )); do
echo $i$j$k
done
done
done
Will the above code work on a BOURNE shell?

As far as my understanding is,...
29,785
Posted By navienavnav
Wow! Thanks....those were amazingly fast replies!...
Wow! Thanks....those were amazingly fast replies!

What is the difference between the two methods? Is there a difference (in any scenario) or is it just a matter of personal choice?
29,785
Posted By navienavnav
How to store the return value of a command into a variable?
I want to store the return value of

grep -c string filename

into a variable, say count. How do I do that?

For example if grep -c "string" "filename" shows 0 on executing it in the sh shell...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 06:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy