hi guyz


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting hi guyz
# 1  
Old 05-30-2008
hi guyz

i require a script which can import the ip address and use it as an input to other.
# 2  
Old 05-30-2008
ip_add=`hostname -i`
echo $ip_add

This may help u.
# 3  
Old 05-30-2008
hi

thank for the reply
but i am getting an error stating the flag i is not regonized
i am able to do the same without flag
# 4  
Old 05-30-2008
Atleast works here without -i flag..

Code:
nua7@XX0703328304 ~
$ hostname
XX0703328304

nua7@XX0703328304 ~
$ ip_add=`hostname`

rkhaladkar@XX0703328304 ~
$ echo $ip_add
XX0703328304

nua7@XX0703328304 ~
$

Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Output formatting prob.. guyz plz hlp

:)Hi guys, I have written a script that returns 3 things of all the employees in my organisation. i.e. Name, Login time & log out time of each and every employee. It returns the output in pipe-delimited format. For your ref. sending a small sample e.g. Deepti|083032|174501... (5 Replies)
Discussion started by: anushree.a
5 Replies
Login or Register to Ask a Question