Nevets1106
Programmer
I have a file that contains a snapshot of all the current files and directories. I am trying to remove several directories from this snapshot. What I have is:
sed '/\/tmp/ d' snapshot
The issue is that the sed command uses the same delimeter as the directory /. I've tried setting the directory to a variable and using double quotes as below with no luck:
dir= "/tmp"
sed "/$dir/ d' snapshot
Any help or suggestions would be very appreciated. Thanks ahead of time
sed '/\/tmp/ d' snapshot
The issue is that the sed command uses the same delimeter as the directory /. I've tried setting the directory to a variable and using double quotes as below with no luck:
dir= "/tmp"
sed "/$dir/ d' snapshot
Any help or suggestions would be very appreciated. Thanks ahead of time