in reply to Re^2: one liner with separate input file?
in thread one liner with separate input file?

True, I forgot to add the name of the file at the end of the command line. Sorry about that.

But I can't say what went wrong with what you are saying in your comments.

Please give full details on what you are trying: exact command line used, sample input files, OS on which you are working, any other thing worth of interest (such as warnings or errors).

Je suis Charlie.
  • Comment on Re^3: one liner with separate input file?

Replies are listed 'Best First'.
Re^4: one liner with separate input file?
by MrGibbs (Initiate) on Apr 17, 2015 at 21:13 UTC
    Hi Laurent_R.

    Over the past few days, I've been continuing to work on doing this in a perl script instead of a one-liner. I have made some progress. I does exactly what I want when the ip_addr file contains 1 ip address. I tested it again with 3, and it does the first ip address, and does not do the 2nd or 3rd. I figure if I can do it for 3, then I can do it for N ip addresses.

    I'm doing this in Solaris 10, to answer your question. The current sate of the script is a mess with comments and print statements akimbo.

    If this was vi, I'd be doing this:
    :g/66.11.22.23/s/^/#/

    The problem is that I have several hundred ip addresses. Thanks for the response, regardless.

        I obviously agree with ww (I wish I could ++ his or her post, but it seems that I can't, it seems that I used all my voting rights for today, first time in a quite long period.)

        Please show your code.

        Update, Apr. 18: Now that I recovered some voting rights, I was able to ++ the post.

        Je suis Charlie.