|
|
04-27-2012
, 11:19 AM
|
|
|
Posts: 1,621 |
Thanked: 4,302 times |
Joined on Apr 2009
@ Germany
|
#2
|
|
|
04-27-2012
, 11:32 AM
|
|
Posts: 145 |
Thanked: 301 times |
Joined on Jan 2010
@ Milton Keynes, UK
|
#3
|
08
Integers with leading "0" are interpreted as octal, so 08 is an illegal
octal number.
Remove the leading "0".
Nicolai
|
|
04-27-2012
, 11:37 AM
|
|
Posts: 701 |
Thanked: 582 times |
Joined on Sep 2010
@ London, England
|
#4
|
a=$(echo "( $a * 60 ) + $x" | bc )
| The Following 8 Users Say Thank You to retsaw For This Useful Post: | ||
|
|
04-27-2012
, 11:52 AM
|
|
Posts: 145 |
Thanked: 301 times |
Joined on Jan 2010
@ Milton Keynes, UK
|
#5
|
|
|
04-27-2012
, 12:40 PM
|
|
Posts: 245 |
Thanked: 348 times |
Joined on Jul 2010
@ Scotland
|
#6
|
#!/bin/bash
LIFE=042
# Will return 34 as LIFE is interpreted as octal
echo $((LIFE))
# Force decimal representation
LIFE=$((10#${LIFE}))
# Should return the proper meaning of life
echo $((LIFE))
|
|
04-27-2012
, 12:58 PM
|
|
Posts: 701 |
Thanked: 582 times |
Joined on Sep 2010
@ London, England
|
#7
|
| The Following 3 Users Say Thank You to retsaw For This Useful Post: | ||
|
|
04-27-2012
, 01:06 PM
|
|
Posts: 245 |
Thanked: 348 times |
Joined on Jul 2010
@ Scotland
|
#8
|
Which while it works with bash, the N900 by default uses the ash shell built in to busybox and it doesn't work with that.
|
|
04-27-2012
, 02:07 PM
|
|
Posts: 574 |
Thanked: 903 times |
Joined on Feb 2010
@ Gdynia, Poland
|
#9
|
Unless for OP "any shell"=="bash" which is a common misunderstanding (and a reason to facepalm for OP), but I doubt it
| The Following 6 Users Say Thank You to misiak For This Useful Post: | ||
|
|
04-27-2012
, 02:32 PM
|
|
Posts: 701 |
Thanked: 582 times |
Joined on Sep 2010
@ London, England
|
#10
|
| The Following 3 Users Say Thank You to retsaw For This Useful Post: | ||
![]() |
| Thread Tools | Search this Thread |
|
I think i've found a little bug but would love for someone to confirm?
Basically I have this script
This works on a unix box that I had access to but on the N900 I get the following error
Thanks
jamie
UPDATE:
I've found that if I set IN to the following it works except for the lines in red italics? how wierd is that?
IN=00:00:19.12
IN=00:01:19.12
IN=00:02:19.12
IN=00:03:19.12
IN=00:04:19.12
IN=00:05:19.12
IN=00:06:19.12
IN=00:07:19.12
IN=00:08:19.12
IN=00:09:19.12
IN=00:10:19.12
IN=00:11:19.12
IN=00:12:19.12
IN=00:13:19.12
IN=00:14:19.12
IN=00:15:19.12
IN=00:16:19.12
IN=00:17:19.12
IN=00:18:19.12
IN=00:19:19.12
IN=00:20:19.12
Last edited by jamiefuller; 04-27-2012 at 11:08 AM.