Greg + free time = BASH scripts

Status
Not open for further replies.

Greg

Indeed.
Messages
1,600
Here is my latest one, it uses SAMBA and Zenity to grab the IP of a networked computer when you supply the hostname.
Code:
#!/bin/bash

GETIP=$(command net lookup `zenity --entry --title='IP Finder' --text='Please Enter the Hostname'`)
command zenity --info --text=$GETIP'    ' --title='IP Finder'
I am pretty new to BASH scripting (if you couldn't tell), but out of all my scripts this is probably one of the most useful.

Anyone else write any that you would like to share? Comments? Suggestions?

~Greg
 
hmm, doesn't work for me, nor does it give the hostname when you ping the IP

besides, writing scripts is more fun :p
 
heh, yeah, I guess there is a lot of ways to do it, but I just wanted to make a quick graphical way with Zenity, and I felt like writing a script.

All I have to do now is Right Click > Scripts > IP Finder and enter the hostname
 
nmblookup -A ip address

I'm just messing with you :D , but I am glad you like writing shell scripts. Hey, the more you add to the script, you might come up with a useful tool for automatically doing basic stuff!
 
Status
Not open for further replies.
Back
Top Bottom