if [ -k file ]
then
echo "File has sticky bit set"
fiif [ -n "$(find file -prune -perm /1000)" ]
then
echo "File has sticky bit set"
fitest -k file and [ -k file ] are not
defined by POSIX. To ensure compatibility with all target systems, use
find instead.
None. If you are targeting a shell that supports
test -k, specify it in the shebang.
ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.