Skip to content

Instantly share code, notes, and snippets.

@ewxrjk
Created February 2, 2018 12:31
Show Gist options
  • Save ewxrjk/acffe12aba91e69fddf9957b8cdd5545 to your computer and use it in GitHub Desktop.
Save ewxrjk/acffe12aba91e69fddf9957b8cdd5545 to your computer and use it in GitHub Desktop.
shell difference
$ cat t
#! /bin/sh
set -e
s() {
"$@"
}
x=y s env
$ bash ./t|grep ^x
x=y
$ dash ./t|grep ^x
$ dpkg -l bash dash
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii bash 4.4-5 amd64 GNU Bourne Again SHell
ii dash 0.5.8-2.4 amd64 POSIX-compliant shell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment