Skip to content

Instantly share code, notes, and snippets.

@KristianLyng
Created January 12, 2011 10:28
Show Gist options
  • Select an option

  • Save KristianLyng/775984 to your computer and use it in GitHub Desktop.

Select an option

Save KristianLyng/775984 to your computer and use it in GitHub Desktop.
# Dash is /bin/sh on Ubuntu and "system" scripts should work on it
kristian@freud:~$ dash
$ echo Variable: $HOSTNAME Command: $(hostname)
Variable: Command: freud
$ bash
kristian@freud:~$ echo Variable: $HOSTNAME Command: $(hostname)
Variable: freud Command: freud
# FreeBSD:
[root@dunstan ~]# bash
[root@dunstan ~]# echo Variable: $HOSTNAME Command: $(hostname)
Variable: dunstan.varnish-software.com Command: dunstan.varnish-software.com
[root@dunstan ~]# sh
# echo Variable: $HOSTNAME Command: $(hostname)
Variable: Command: dunstan.varnish-software.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment