Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: Daniel on May 10, 2011, 04:03:01 AM
-
Hi,
I've got scripts to on/off backlight.
The commands pass with /dev/ttyUSB0 access
Command example:
echo -ne "B255\r" > /dev/ttyUSB0
It runs ok when script is executed directly : backlight ON / OFF ok.
When i call one script from an other script, no change on backlight !
I'm root!
I'm thinking about environment variables ... but ?
Thanks
Daniel.
-
Script and application are launched in sh.
Adding #!/bin/bash at the beginning of the script make it runs!
In fact, bash is default : the reason because script direct execution is ok.
Daniel.
-
It is simply wrong to declare scripts containing bashisms as #!/bin/sh
-
I've got big scripts in sh ... no time to convert and test them now :(
New scripts are written with bash ;D
Thanks
daniel.
-
New scripts are written with bash ;D
Umm... It would be equally wrong to declare POSIX shell compatible scripts as #!/bin/bash ::)
-
Then, what is the best thing to do ?
D.
-
Umm... It would be equally wrong to declare POSIX shell compatible scripts as #!/bin/bash ::)
How's that? Bash is posix compatible, so it's merely resource overhead.
-
Then, what is the best thing to do ?
D.
Declare only those scripts which contain bashisms as #!/bin/bash
-
Umm... It would be equally wrong to declare POSIX shell compatible scripts as #!/bin/bash ::)
How's that? Bash is posix compatible, so it's merely resource overhead.
bash can run in POSIX compatibility mode [which it doesn't when invoked by #!/bin/bash - but that's beside the point here], but declaring POSIX shell compatible scripts as #!/bin/bash unnecessarily reduces compatibility/portability
-
I've got big scripts in sh ... no time to convert and test them now :(
I said convert sh script in bash, not replace sh with bash! :)
hum ... now, my script is functionning : what i wanted.
And i know why :)
Thanks
daniel.
-
I said convert sh script in bash, not replace sh with bash! :)
There seems to be a language barrier issue making communication difficult :-\
-
eternal communication problem between men!
:'(
lol
D.