I have a text file located at c:\computers.txt. Â Inside this file is the following:
computer 7 8 8
I want to delete a line from this file. Â The trick is, to delete only what I enter into a variable. Â So if $deletecomputer = ‘computer 345’ I want to delete just computer 345. Â The variable would could contain any one computername.
Everything I’ve found shows how to replace text. Â I’m not necessarily looking to replace. Â I’m looking to delete.