The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Scripting question moe2266 Shell Programming and Scripting 1 08-01-2007 10:21 PM
scripting question? justinburbridge Shell Programming and Scripting 2 04-19-2006 08:58 AM
scripting question batmike Shell Programming and Scripting 3 11-26-2002 01:58 PM
Scripting Question damielle Shell Programming and Scripting 1 12-06-2001 02:13 PM
another scripting question kristy UNIX for Dummies Questions & Answers 1 05-07-2001 09:02 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 04-21-2006
Registered User
 

Join Date: Apr 2006
Posts: 14
Lightbulb scripting question

i have to use bash to get system information like IP address and the operating system being used, does anybody know how to do this?
Reply With Quote
Forum Sponsor
  #2  
Old 04-21-2006
Klashxx's Avatar
HP-UX/Linux/Oracle
 

Join Date: Feb 2006
Location: Almerķa, Spain
Posts: 383
Check

uname
nslookup


Bye
Reply With Quote
  #3  
Old 04-21-2006
Registered User
 

Join Date: Apr 2006
Posts: 14
Lightbulb newbie

Hey, i am a newbie to unix scripting, do i just enter this code to get the info or is there more needed, all i know so far is using awk and grep to find the line of the information and just displaying that line, do u know a simple script to show this in use?
Reply With Quote
  #4  
Old 04-21-2006
Klashxx's Avatar
HP-UX/Linux/Oracle
 

Join Date: Feb 2006
Location: Almerķa, Spain
Posts: 383
EX:
Code:
$ uname
HP-UX

$ uname -n
node_name

$ nslookup $(uname -n)
Using /etc/hosts on:  node_name

looking up FILES
Name:    node_name.domain.es
Address:  0.0.0.0
Aliases:  node_name
Reply With Quote
  #5  
Old 04-21-2006
Registered User
 

Join Date: Apr 2006
Posts: 14
Lightbulb problem

for some reason i can not view any code in the code boxes at all in this forum, is there another way that you could show your code to me, i.e. dont post it as code or via e-mail?
Reply With Quote
  #6  
Old 04-21-2006
Klashxx's Avatar
HP-UX/Linux/Oracle
 

Join Date: Feb 2006
Location: Almerķa, Spain
Posts: 383
And now?

$ uname
HP-UX

$ uname -n
node_name

$ nslookup $(uname -n)
Using /etc/hosts on: node_name

looking up FILES
Name: node_name.domain.es
Address: 0.0.0.0
Aliases: node_name
Reply With Quote
  #7  
Old 04-21-2006
Registered User
 

Join Date: Apr 2006
Posts: 14
Lightbulb thanks

thank you for that, i can now read it, but which part of it would give you the ip address information? like i said i am new to this so my questions may appear to be a bit stupid but i am just trying to understand it
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:48 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0