I have a file that contains directory names:

my_list.txt :

/tmp
/var/tmp

I’d like to check in Bash before I’ll add a directory name if that name already exists in the file.

16 Answers
16

Leave a Reply

Your email address will not be published. Required fields are marked *