mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2006
Posts: 3
M
Self-satisified door
OP Offline
Self-satisified door
M
Joined: May 2006
Posts: 3
I am trying to delete a line out of a text file and I assumed /write -d was the best way, however i dont want to specify the line number, i want it to delete the line based on the text in it. is there any way to do so?

so like if someone does

!delline dummy

it searches a text file for the word dummy and deletes the line with that word in it.

thanks.

Joined: Feb 2006
Posts: 523
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 523
use /write -d along with one of the 's' or 'w' switches laugh i assume you wana find the string anywhere on any line in the file, try this:

Code:
on *:text:!delline *:#:{ write -dw"* $+ $2-*" file.txt }


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde

Link Copied to Clipboard