nslookup - repeat last command

Discussion in 'macOS' started by revokin, Feb 5, 2011.

  1. revokin macrumors member


    Oct 16, 2008
    Is there any way to repeat the last command in nslookup in OSX?

    In other systems when using nslookup I can just hit up arrow and it will go back through my commands the same way it works in terminal. When I'm in nslookup and hit the up arrow it just shows ^[[A
  2. LPZ macrumors 65816

    Jul 11, 2006
    I assume it's because nslookup wasn't compiled with readline support. You can install the rlwrap utility and then invoke

    rlwrap nslookup

    in Terminal. That will do what you want; I just tested.

    By the way, nslookup is being replaced by dig, which is also available via Terminal.
  3. revokin thread starter macrumors member


    Oct 16, 2008
    Thanks for the info! I didn't realize dig was replacing nslookup. I had used it before but just thought it was another dns lookup tool. I'll have to start using it :)

Share This Page