[PATCH] BBB: sd_setup.sh: Change /bin/bash -> /bin/sh to solely adhere to POSIX shell constructs

Chris Johns chrisj at rtems.org
Sun Jul 12 22:49:21 UTC 2015


On 12/07/2015 11:48 am, Jarielle Catbagan wrote:
> Interesting. On my machine /bin/sh is a symbolic link to /bin/bash.  I
> went ahead and tried /bin/dash and the 'echo' command can interpret
> backslash characters whereas echo on sh/bash, -e has to be specified
> otherwise the characters are outputted as is.

The joys of a distro based operating systems.

> 
> I tried printf in bash/sh and dash, and the command seems to be more
> compatible in both shells.  I think this would be the solution in that
> all 'echo' commands are replaced with 'printf'.  What do you think?
> 

MacOS:

 $ printf "Hello World\n"
 Hello World
 $ type printf
 printf is a shell builtin

FreeBSD:

 $ printf "Hello World\n"
 Hello World
 $ type printf
 printf is a shell builtin

Chris


More information about the umon-devel mailing list