você quer a página TLDP para o BASH,
advanced bash: link
beginner bash: link
o que você estava perguntando é sobre operadores de teste de arquivo e pode ser encontrado aqui: link
e expressões condicionais bash que podem ser encontradas aqui: link
-d file is a directory
-f file is a regular file
-e file exists
-s file size is not zero
-b file is a block device
-h file is a symbolic link
-w file has write permissions for user executing this bash statement
{there are more}
#!/bin/bash
if [ -e $1 ] && [ -w $1 ]; then
echo "the file you entered was "$1" and it exists and you have write permission to it"
else
echo "condition failed for exist and for write permission"
fi