How do I find all file path apart from specific one?
I have list of files in filename.txt
dir /etc/folder1
dir /usr/folder2
I need to check if there is any other directory entry in file apart from
dir /usr/folder2 ? Basically, make sure there are no other entries apart
from dir /usr/folder2, I tried using but this even matches dir
/usr/folder2
grep -E 'dir /[:alpha]*/*' /etc/filename.txt
Is there a better way to do this ?
No comments:
Post a Comment