LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 09-10-2017, 01:56 AM   #1
prcm
LQ Newbie
 
Registered: Aug 2017
Posts: 6

Rep: Reputation: Disabled
Best way to convert RHEL 7.4 ifconfig -a dump to RHEL 6.3


Hi,

we have a script which uses ifconfig -a dump, parses it & gets required data. Now in RHEL 7.4 the ifconfig -a dump is changed as compared to RHEL 6.3 .

Now i need way to convert this dump back to the way it looks in RHEL 6.4 . So what is the best way to do it?

sample dump :
In RHEL 6
Quote:
eth0 Link encap:Ethernet HWaddr 00:11:3F:CD:EB:3D
inet addr:10.0.33.1 Bcast:10.0.47.255 Mask:255.255.240.0
inet6 addr: fe80::211:3fff:fecd:eb3d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15633722 errors:0 dropped:0 overruns:0 frame:0
TX packets:13595597 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1645440580 (1.5 GiB) TX bytes:1201742677 (1.1 GiB)
Memory:fba80000-fbb00000

In RHEL 7
Quote:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.16.225.17 netmask 255.255.240.0 broadcast 172.16.239.255
inet6 fe80::211:3fff:feee:8b5f prefixlen 64 scopeid 0x20<link>
ether 00:11:3f:ee:8b:5f txqueuelen 1000 (Ethernet)
RX packets 281784 bytes 66708264 (63.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 56 bytes 2664 (2.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xfbd80000-fbdfffff

Last edited by prcm; 09-10-2017 at 02:00 AM. Reason: added an example
 
Old 09-10-2017, 02:57 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
You are the only person that knows what data you are interested in.
Adapt the script to handle either as input.
 
  


Reply

Tags
ifconfig, rhel7, rhelmigration, shell scripting



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is a main difference between rhel 6 and rhel 7 accourding to rhel exam bikesh Linux - Newbie 6 12-05-2014 12:06 AM
Cannot create an IPv6 (alias IP) using ifconfig RHEL 4 AS/ES the_rock Linux - Networking 5 07-15-2014 04:25 PM
Core dump not being generated in RHEL 6.4 khandu Red Hat 6 04-05-2013 08:28 AM
how to create kernel dump on rhel 4.7? kingston Linux - Server 4 01-19-2011 03:16 AM
Can any one upload RheL Dump papers??? bala016 Linux - Certification 8 05-25-2007 01:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 02:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration