LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 01-10-2015, 07:13 AM   #1
saeedsssss
Member
 
Registered: Apr 2012
Posts: 43

Rep: Reputation: Disabled
Omit a part of text file


Hi
please see the file attached.
then how we can omit these parts with command on linux ?

Click image for larger version

Name:	fada.png
Views:	18
Size:	131.9 KB
ID:	17324


thank you.
 
Old 01-10-2015, 09:00 AM   #2
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,465

Rep: Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370
Code:
grep "^[[:alpha:]]" New_Text_Document

Last edited by allend; 01-10-2015 at 09:09 AM.
 
Old 01-11-2015, 01:53 AM   #3
saeedsssss
Member
 
Registered: Apr 2012
Posts: 43

Original Poster
Rep: Reputation: Disabled
I want omit below part from my document but allend's command show it.

==============================================================================
--------------- Host --------------- - Stor - -- I/O Path -- -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
3 qla2xxx sdal SP A6 active alive 0 0
2 qla2xxx sdao SP A5 active alive 0 0
3 qla2xxx sdcd SP A7 active alive 0 0
2 qla2xxx sdcg SP B4 active alive 0 0
3 qla2xxx sddu SP B6 active alive 0 0
2 qla2xxx sddz SP B5 active alive 0 0
3 qla2xxx sdfg SP B7 active alive 0 0
2 qla2xxx sdi SP A4 active alive 0 0

example my document attached.
my_document.txt
 
Old 01-11-2015, 03:01 AM   #4
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,465

Rep: Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370Reputation: 1370
On my setup, I see
Code:
bash-4.3$ grep "^[[:alpha:]]" my_document.txt 
Pseudo name=emcpowerf
CLARiiON ID=CKM001148011345 [BILLWEB-2]
Logical device ID=60060160B1E1234R3F3F4F4FF3F43 [DDDD-2_1]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0;
Owner: default=SP B, current=SP B       Array failover mode: 4
Pseudo name=emcpowerv
CLARiiON ID=CKM00114801345 [BILLWEB-2]
Logical device ID=60060160B1E12E0034F3F34F343F343 [DDDD-2_2]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0;
Owner: default=SP A, current=SP A       Array failover mode: 4
 
Old 01-11-2015, 03:16 AM   #5
saeedsssss
Member
 
Registered: Apr 2012
Posts: 43

Original Poster
Rep: Reputation: Disabled
Tank you.
 
  


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
find command and omit directories also create a text file and email out rooster17 Red Hat 3 02-22-2014 08:45 AM
how to print part of text of a text file in bold and color using shellscript swapna sree Linux - Newbie 25 07-12-2011 12:19 PM
[SOLVED] Script to copy paste text from one file to another (overwriting part of the file) freet Programming 4 04-19-2011 04:23 PM
[SOLVED] Need help with script to replace certain text in file with part of the file's name kmkocot Linux - Newbie 2 08-23-2009 05:06 PM
How to strip a specific part of text from a larger file? pepsi_max2k Programming 10 03-27-2009 05:00 AM


All times are GMT -5. The time now is 01:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration