View Single Post
  #2   (View Single Post)  
Old 2nd February 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by isthistheend View Post
i bet solution is too easy
This sounds like a homework problem.

I hope others let you respond before jumping in providing answers. You will get more out of the exercise if you work it out yourself as opposed to simply letting someone else supply you an answer.

In fact, there are several ways this script can be written.
Quote:
i need to combine their outputs like;

"İnterface name" "ip address"
So, let me paraphrase the information presented. There are two values you have determined.
  • How would you assign the result of each to a variable?
  • How would you print two different variables on the same line?
For bonus points, a very basic introduction to shell scripting can be found at the following:

http://steve-parker.org/sh/sh.shtml

The answers to your questions can be found there too, but you may need to think about the fundamental problems first.

Last edited by ocicat; 2nd February 2011 at 09:52 AM.
Reply With Quote