The Dash shell, a POSIX-compliant derivative of the Almquist shell used as /bin/sh in Debian, Ubuntu and other Linux distributions

learn more… | top users | synonyms

2
votes
2answers
817 views

Calling bash from sh (dash) with commands read from args, and “Unterminated quoted string”/“unexpected EOF”

Just thought I'd document this: I'm trying something very simple - set env variable in bash, and print it out: $ bash -c "a=1; echo a$a;" a $ bash -c "a=1; echo a\$a;" a1 Now I'd want this same ...
2
votes
2answers
1k views

When sh is a symlink to bash or dash, bash limits itself to POSIX-compliance, so it should be 100% compatible with sh?

From Difference between bash and sh: ABck to the question: If you have /bin/sh as a link to bash, then bash will not behave the same when called as /bin/sh as it does when called as /bin/bash. ...
0
votes
1answer
590 views

POSIX and Bash, sh shorthand, for compound if statement

I prefer to do my sh commands in shorthand, And I prefer to be in POSIX. Truthfully, if the script can run on Dash, that is good enough. Which means using the test command [, not the extended [[. I ...