Search Results

Search: Posts Made By: niasha
33,666
Posted By niasha
n1=$( echo $N1 | tr -d '\r' ) n2=$( echo $N2 |...
n1=$( echo $N1 | tr -d '\r' )
n2=$( echo $N2 | tr -d '\r' )

worked , thanks a lot , and one more things , what is this error ?
Escape character is '^]'.


ehsan@debian:~$ telnet 192.168.1.4...
33,666
Posted By niasha
same error ehsan@debian:~$ telnet 192.168.1.4...
same error
ehsan@debian:~$ telnet 192.168.1.4 1234
Trying 192.168.1.4...
Connected to 192.168.1.4.
Escape character is '^]'.
+ read N1
12
+ read N2
13
+ typeset -i N1
+ typeset -i N2
++...
33,666
Posted By niasha
i try telnet on the same machine with script and...
i try telnet on the same machine with script and another machine but there is same results

ehsan@debian:~$ telnet 192.168.1.4 1234
Trying 192.168.1.4...
Connected to 192.168.1.4.
Escape...
33,666
Posted By niasha
i try this as you said #!/bin/bash read ...
i try this as you said

#!/bin/bash
read N1; read N2
typeset -i N1
typeset -i N2
echo $N1
echo $N2
((sum=N1+N2))
echo $sum


and i got this

ehsan@debian:~$ telnet 192.168.1.4 1234...
33,666
Posted By niasha
still doesn't work ehsan@debian:~$ telnet...
still doesn't work
ehsan@debian:~$ telnet 192.168.1.4 1234
Trying 192.168.1.4...
Connected to 192.168.1.4.
Escape character is '^]'.
12
")syntax error: invalid arithmetic operator (error token...
33,666
Posted By niasha
thanks but i got this with this script ...
thanks but i got this with this script

ehsan@debian:~$ telnet 192.168.1.4 1234
Trying 192.168.1.4...
Connected to 192.168.1.4.
Escape character is '^]'.
12
23
")syntax error: invalid...
33,666
Posted By niasha
Non-integer argument in expr
i wrote this simple shell script


#!/bin/bash
read N1
read N2
expr $N1 + $N2

it work fine in bash and i add it on xinetd for some test but when i try to use in with telnet i got this...
Showing results 1 to 7 of 7

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