Question

Hello I need help creating a bash script for linux as shown below getting the information...

Hello

I need help creating a bash script for linux as shown below getting the information from ifconfig The script must programmatically gather and output the informationEXACTLY AS SHOWN BELOW and (not echo this and echo that).

======================================
Interface: AAA
MAC Address: BB:BB:BB:BB:BB:BB
IP Address: CCC.CCC.CCC.CCC
Subnet Mask: DDD.DDD.DDD.DDD
Received Bytes: EEEEEE
======================================

Thanks,

0 0
Add a comment Improve this question Transcribed image text
Answer #1

For gathering the ifconfig the bash script is

ifconfig | pel-nle 's/dr:(/s+)print $1/e'

otherwise you can use the below

ifconfig| awk'/inet addr/{print substr($)}'

Add a comment
Know the answer?
Add Answer to:
Hello I need help creating a bash script for linux as shown below getting the information...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT