Check if a file exists or not using Bash Script



if [ -e "$file_path" ]; then
    echo "The File data.csv exists."
    echo "The File data.csv does not exist."

The File data.csv does not exist.

Check if a file exists or not using bash Script

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap