Search Results

Search: Posts Made By: Cyansnow
44,607
Posted By Cyansnow
When I loose the quotes.. The terminal says,...
When I loose the quotes..
The terminal says, Unary operator expected.
44,607
Posted By Cyansnow
Ok.. thanks Decent and Methyl for letting me know...
Ok.. thanks Decent and Methyl for letting me know about backticks.

Here's my updated program:
echo Enter a number
read no
i=1
ans=0
while [ "$i" -le "$(expr $no / 2)" ]
do
if [...
44,607
Posted By Cyansnow
what?? excuse me.. I didn't get you..
what??
excuse me.. I didn't get you..
44,607
Posted By Cyansnow
Ok.. I fixed it.. Also fixed in if [ 'expr...
Ok..
I fixed it..
Also fixed in
if [ 'expr $no % $i' -eq 0 ]

But still some problem!! :(
44,607
Posted By Cyansnow
A perfect number shell program
Here's my work of testing whether a number input is perfect or not..

echo Enter a number
read no
i=1
ans=0
while [ $i -le 'expr $no / 2' ]
do
if [ 'expr $no % $i' -eq 0 ]
...
2,918
Posted By Cyansnow
Wrong Post
I don't know how to delete this thread.
Admin/Mod, Please delete this thread.

Thanks.
Showing results 1 to 6 of 6

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