Skip to content
xcko edited this page Nov 18, 2018 · 2 revisions

scratchpad for useful tricks

using aliases with the busybox ash shell

ash follows posix guidelines and does not source a specific rc file when starting an interactive session. Instead, an rc file has to be declared in the enviroment. ie add the following lines to your ~/.profile

    ENV=$HOME/.ashrc
    export ENV

now aliases and functions can be added to ~/.ashrc like a typical ~/.bashrc

    alias la='ls -a'

The openbsd ksh behaves in the same way.

debug variables in Makefiles

$(info VAR = ${VAR})

(must not be indented)

fancy version:

debug = $(info $1 = $(value $1))  $(call debug VAR)