Forum Discussion
keithhubb
Oct 28, 2015Employee
Combine and Modify Grep Output
Hi, I'm trying to write a script to output virtual server stats. Can anyone help me modify the output?
Right now the GREP output looks like this:
Ltm::Virtual Server: www.website.com.443
Bits ...
devopsdd_183664
Oct 28, 2015Altostratus
Here's something quick if your grep output is in output.txt:
root@dev-localhost:~ sed 'N;N;s/\n//g' output.txt | awk '{print $3, $4, $5, $6, $9, $10, $11}'
www.website.com.443 Bits In 2.1G Bits Out 2.3G
www.website.com.80 Bits In 1.4G Bits Out 740.8M
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects