r/bash•
[deleted]

I made my first script from scratch!

submission

I didnt think it would even work, but it did. Its very simple, but I came up with this all on my own.

The idea is to get the IP address of a website using nslookup here it is


#!/bin/bash

echo "Enter a website";
read var

nslookup $var;
echo "$var"

Now the formatting for ns look up is odd, so Im not sure how to use awk with it, but im still excited that I made something and it works.

Posted Feb 22, 2016, 5:58 AM UTC

94
Loading comments…