Shell-script question about getting a number as a variable
I have a little script. In it, i have to get a page where will be a number, that is very important to me.
like this... Code:
lynx -dump http://192.168.0.2/venda_atual.php > temp.php Code:
1670 Code:
links http://192.168.0.2/venda.php What can i do? Also, are there any syntax error in my script? |
If your shell is set up to have extglob on with shopt -s extglob, the following works:
Code:
$ venda=" 1670" |
Well, looks like shell script hates me a lot.
This script donīt work Code:
links http://192.168.0.2/programa/venda.php Code:
Can't Access `file://localhost/root/1732%0D%0D' |
Can you try it again after running shopt -s extglob at a bash prompt? If the extglob option isn't set, the +( ) part of the substitution won't be recognised.
|
I tried it, still not working... :(
|
Please try this:
Code:
links http://192.168.0.2/venda.php "set -x" can be your friend, too. for example: Code:
links http://192.168.0.2/venda.php |
Thanks for the help :)
Iīm still getting some errors. I hope you can help me. Code:
request id is epsonlx300-9 (1 file(s)) |
The first error tells you the basic problem:
Code:
Error: Expected at least 3 tokens for --yesno, have 1. Code:
dialog --yesno '\n Deseja imprimir a venda novamente?' \ Code:
dialog --yesno '\n Deseja imprimir a venda novamente?' 0 0 \ |
paulsm4, it is complaining about it again
Code:
Error: Expected no more than 3 tokens for --yesno, have 4. |
Solved. Thanks for the help guys. The problem was in the text editor i was using. Somehow joe was fucking my script. When i changed to nano, everything got perfect.
I think this could be a bug on joe with portuguese language and simbols like "į". |
All times are GMT -5. The time now is 09:28 PM. |