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?

Check

uname
nslookup

Bye

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?

EX:

$ 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

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?

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

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

Here u have:

hey, i must have a problem with my I.E or something, i cant read the quotes either just like the code posts

Opss....try FireFoX! :slight_smile:

Address: 0.0.0.0 -->It just an example here u will have tour real IP.

Cheers

hey thanks dude. As soon as i had just sent the last reply i realised that i had not tied the forum using firefox, so i tried it and it worked fine, so all is good