i don't always use the trap builtin command, but i will start using it in my script. You should have made provision for type checking using the type builtin command.
for example to check if a command is a function or an alias
s(){printf"bash is good\n"}checkType=$(type-t s)[["$s"!="function"]]&&{printf"$s is not a function"exit 1
}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
i don't always use the
trap
builtin command, but i will start using it in my script. You should have made provision fortype
checking using the type builtin command.for example to check if a command is a function or an alias