rm exist.txt 2> /dev/null
If it does not exist, this code will result in standard error. Then discard 2 of the standard error output to / dev / null.
reference https://qiita.com/i35_267/items/158cd20ed26f73a3d894
Recommended Posts