Tuesday, December 24, 2019

Uncomment - Quickly check config files

alias uncomment='_(){ if (($#<1))||[[ "${1}" =~ ^- || ! -e "${1}" ]]; then (($#>0))&&[[ ! "${1}" =~ ^- ]]&&[[ ! -e "$1" ]]&&echo "*** Error: File (\"$1\") not found.";echo "Usage: uncomment <file>"; return 1;fi;grep -iP "^([ \t\r\f]|[^#])*[^# \h\t\f\r]+" "$1";};_' 
Get the latest on GitHub.