LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 06: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:	25
Size:	131.9 KB
ID:	17324


thank you.
 
Old 01-10-2015, 08:00 AM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,367

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

Last edited by allend; 01-10-2015 at 08:09 AM.
 
Old 01-11-2015, 12: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, 02:01 AM   #4
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,367

Rep: Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747
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, 02: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 07: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 11:19 AM
[SOLVED] Script to copy paste text from one file to another (overwriting part of the file) freet Programming 4 04-19-2011 03: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 04:06 PM
How to strip a specific part of text from a larger file? pepsi_max2k Programming 10 03-27-2009 04:00 AM

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

All times are GMT -5. The time now is 02:42 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