Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 08-24-2006, 05:06 AM   #1 (permalink)
Greg's Avatar
 
Indeed.

Join Date: Dec 2004

Posts: 1,554

Greg is on a distinguished road

Default Greg + free time = BASH scripts

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
__________________
Greg is offline  
Old 08-24-2006, 05:44 AM   #2 (permalink)
 
True Techie

Join Date: Dec 2004

Posts: 164

Skuzzle

Default

doesnt typing ping followed by hostname give the ip address too ??
__________________
Skuzzle - Powered by Badgerbyte Web & IT Services
www.drive4fun.co.uk check it out
Skuzzle is offline  
Old 08-24-2006, 05:54 AM   #3 (permalink)
Greg's Avatar
 
Indeed.

Join Date: Dec 2004

Posts: 1,554

Greg is on a distinguished road

Default

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

besides, writing scripts is more fun
__________________
Greg is offline  
Old 08-24-2006, 10:23 AM   #4 (permalink)
Law
Law's Avatar
 
Wizard Techie

Join Date: Aug 2005

Location: the data closet

Posts: 4,172

Law is on a distinguished road

Default

host command

Good to see you like writing scripts
__________________

Law is offline  
Old 08-24-2006, 03:21 PM   #5 (permalink)
Greg's Avatar
 
Indeed.

Join Date: Dec 2004

Posts: 1,554

Greg is on a distinguished road

Default

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
__________________
Greg is offline  
Old 08-24-2006, 11:35 PM   #6 (permalink)
Law
Law's Avatar
 
Wizard Techie

Join Date: Aug 2005

Location: the data closet

Posts: 4,172

Law is on a distinguished road

Default

nmblookup -A ip address

I'm just messing with you , 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!
Law is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On