Skip to navigation
Check if a file exists in bash
23.10.18
#!/bin/bash file="/etc/hosts" if [ -f "$file" ] then echo "$file found." else echo "$file not found." fi
https://www.cyberciti.biz/faq/unix-linux-test-existence-of-file-in-bash/
Reply
Anonymous
Information Epoch 1732652067
Think parallel.
Home
Notebook
Contact us