LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-29-2016, 07:31 PM   #1
gdizzle
Member
 
Registered: Jul 2012
Posts: 234

Rep: Reputation: Disabled
Output of a command in the right format? grep/tr/cut?


Hi Linux Friends,

Here is a command output

+--------------+--------------------------------------------------+
| accountname | Clients |
| address | 1.1.1.1 |
| devicename | MyDI Vcenter |
+--------------+--------------------------------------------------+
| accountname | Safety |
| address | 2.2.2.2 |
| devicename | MyDI Vcenter |
'--------------+--------------------------------------------------'

How do I get the output appears only like this?

+--------------+--------------------------------------------------+
| accountname | Safety |
| address | 2.2.2.2 |
| devicename | MyDI Vcenter |
'--------------+--------------------------------------------------'

Thanks
 
Old 03-29-2016, 07:47 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,469

Rep: Reputation: 3084Reputation: 3084Reputation: 3084Reputation: 3084Reputation: 3084Reputation: 3084Reputation: 3084Reputation: 3084Reputation: 3084Reputation: 3084Reputation: 3084
If it always looks like that simply pipe it to tail.
 
Old 03-30-2016, 01:57 AM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,767

Rep: Reputation: 3050Reputation: 3050Reputation: 3050Reputation: 3050Reputation: 3050Reputation: 3050Reputation: 3050Reputation: 3050Reputation: 3050Reputation: 3050Reputation: 3050
The general rule of thumb here is, the less information you provide, the more limited the answers will be.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] cut/grep command help roopakl Linux - Newbie 5 04-29-2013 03:06 PM
print output in desire format using awk or cut command dipanjan Linux - General 1 12-15-2012 02:59 AM
[SOLVED] How to grep, cut, cat in a single command? dwarf007 Programming 6 04-27-2010 03:36 AM
How to use command grep,cut,awk to cut a data from a file? hocheetiong Linux - Newbie 7 09-11-2008 08:16 PM
grep and cut command tanveer Linux - General 3 09-05-2008 03:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:33 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration