Small snippets for simple bash scripting.
#!/bin/bash var=$1 # -z checks if the variable is empty or not if [[ -z $var ]] then echo "empty" else echo "not empty" fi
# Echo all files in current folder for files in *; do echo $files; done new test test.sh
Professional Software Developer, doing mostly C++. Connect with Kent on Twitter.