#!/bin/bash
#############################################################
#                                                           #
#  errnum <nr>   Searches for description of error number   #
#                                                           #
#  Koentje  (remon@cobrasoft.nl)                            #
#                                                           #
#############################################################

arg="$1"

if [[ "$@" == "" ]]; then
 echo -e "\n errnum <nr>       (searches for description of error number)\n"
else
 echo -e "\n * Foutcode: \033[37m$arg\033[m"
 echo -e "--------------------------------------------------------------------------------\033[37m"
 grep $1 /usr/include/asm-generic/errno.h
 echo -e "\033[m--------------------------------------------------------------------------------\n"
fi