Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

revokin

macrumors member
Original poster
Oct 16, 2008
38
7
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
 
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

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.
 
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.

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 :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.