[NTLUG:Discuss] Is there an easy way?

Kevin E. Ivey ik04 at isot.com
Sun Jul 26 02:06:27 CDT 2009


Leroy Tennison wrote:
> I'm not even sure how to Google for this one without having to wade 
> through too many extraneous hits so I'm posting here.  I have three 
> files and need to merge fields from each of them into a single file.  A 
> brief description of each is:
> 
> File 1 has a phone number and an associated IP address (VOIP, Avaya PBX)
> File 2 has an IP address and an associated MAC address (Cisco router).
> File 3 has a MAC address and associated Cisco switch port assignment.
> 
> I need a file containing phone number and associated switch port.
> 
> This may be somewhat OT except I'm hoping there's a Linux utility which 
> will meet the need.  I know that I can turn each file into a database 
> table and do some operation on two tables to "merge" their fields and 
> then repeat again to get what I need but that's the extent of my 
> understanding of that option.  Wondering if there's a utility to take 
> the files directly and do the "merge".  This is a situation where 
> scripting seems to be the wrong solution, I've written something similar 
> in awk and don't want to do that again.  I'm also not looking forward to 
> writing a program in a "real programming language" to accomplish this 
> either.  Thanks for any input.

Sounds like a job for cat.

try: man cat

It's goyya work!

Kevin




More information about the Discuss mailing list