-w FILE (conditional operator)
true
if the file exists and is writable by you, i.e. the current user.
Links
Examples
- Different ways to test if a file is writable:
1 2 3 4
test -w ~/file && echo "writable" [ -w ~/file ] && echo "writable" # Bash [[ -w ~/file ]] && echo "writable"
BashSupport Pro ist eine Bash IDE mit Unterstützung für -w – probieren Sie es aus!