in reply to Re: Remove string from file
in thread Remove string from file

Sorry guys, i meant in the script, not from command i am running a script that can add users and remove users. add users is done, but the remove users, i'm having trouble figuring out..

Replies are listed 'Best First'.
Re^3: Remove string from file
by liverpole (Monsignor) on May 21, 2006 at 14:15 UTC
    What do you have so far?  Can you show some code, even it isn't quite working, so we can see which part needs to be tweaked?

    And what are the specific requirements?  Removing a line (or lines?) that exactly matches/match a given name?  Does it have to work for multiple names, or just one name?  Can the name be anywhere in the line(s)?  Can there be other names in the line, or not?  Does whitespace matter?

    If you can show us the code that you have so far, and pinpoint the exact requirements, I'm sure we can get you farther towards your goal.


    s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/