bash:test_file_existence
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
bash:test_file_existence [2020/07/15 09:30] – external edit 127.0.0.1 | bash:test_file_existence [2021/01/26 12:33] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== BASH - Test File Existence ====== | ||
- | <code bash> | ||
- | #!/bin/bash | ||
- | filename=$1 | ||
- | if [ -f " | ||
- | echo "File exists" | ||
- | else | ||
- | echo "File does not exist" | ||
- | fi | ||
- | </ |
bash/test_file_existence.1594805433.txt.gz · Last modified: 2020/07/15 09:30 by 127.0.0.1