-a FILE (conditional operator)

true if the file exists.

Examples

Different ways to test if a file exists:
1
2
3
4
test -a ~/.bash_profile && echo "found"
[ -a ~/.bash_profile ] && echo "found"
# Bash
[[ -a ~/.bash_profile ]] && echo "found"
BashSupport Pro ist eine Bash IDE mit Unterstützung für -aprobieren Sie es aus!
© 2020–2024 Joachim Ansorg
Impressum
Datenschutz
Rechtliches