![]() |
[Linux bash] Why is this not working?
I've been at this for 3 hours now.
It's not wrorking. Code:
#!/bin/sh I ran this on my phone using putty. On the other hand : this works : Code:
#!/bin/sh |
Re: [Linux bash] Why is this not working?
I didn't know that * is working like that with strings. Is it? It's expanded to filesystem objects names in bash.
If you are sure this should work. How about using #!/bin/bash? :-) |
Re: [Linux bash] Why is this not working?
As far as I know, glob works with == yes,
But, there is no bash on the N900, busybox.... |
Re: [Linux bash] Why is this not working?
Code:
#!/bin/sh |
Re: [Linux bash] Why is this not working?
Quote:
The thing that is not working is the * (asterisks). What I am ultimately trying to do is check if usb0 is RUNNING. |
Re: [Linux bash] Why is this not working?
PHP Code:
|
Re: [Linux bash] Why is this not working?
Quote:
|
Re: [Linux bash] Why is this not working?
Comparing strings like this is a form of regex which requires you use double square brackets around it: if [[ ]]
|
Re: [Linux bash] Why is this not working?
The point is, look at the difference between that and your code. The point isn't "do you have bash on your N900". I don't either.
|
Re: [Linux bash] Why is this not working?
Oops.. I forgot the double brackets.
I knew the lack of quotes on the *bc* though... ;) |
All times are GMT. The time now is 11:05. |
vBulletin® Version 3.8.8