bash

The shell... always under your fingertip. More you master, easies you manage linux machines

Redirect out and err to file and output

strace -f program   2>&1 | tee -a ./stdeo

Get main script run directory

ROOT=$(dirname `readlink -f "$0"`)

Foreach splitted string

UNITS="string splitted string"
for unit in ${UNITS[@]}
do
  echo $unit
done

Helper script prototype

Linuxengineering Toolbox helper script