10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I have a long file in the format below. I want to delete the consecutive lines that contain the same value in column 1.
I have tried awk '!x++' FS="," filename
This has not worked.
14,MM709_BHP_DM,BHP,BHP_MC709_DM
19,OFFLINE,CHE,CHEV_MC773_DM
20,M33,BP,BP_MIM775_NS_DM ... (2 Replies)
Discussion started by: ndnkyd
2 Replies
2. Shell Programming and Scripting
To match range, the command is:
awk '/BEGIN/,/END/'
but what I want is the range is printed only if there is additional pattern that matches in the range itself? maybe like this:
awk '/BEGIN/,/END/ if only in that range there is /pattern/'
Thanks (8 Replies)
Discussion started by: zorrox
8 Replies
3. UNIX for Dummies Questions & Answers
Hi experts , im new to Unix,AWK ,and im just not able to get this right.
I need to match for some patterns if it matches I need to print the next few words to it.. I have only three such conditions to match… But I need to print only those words that comes after satisfying the first condition..... (2 Replies)
Discussion started by: 100bees
2 Replies
4. Shell Programming and Scripting
Hi all,
I want to make an script using sed that removes everything between 'begin' (including the line that has it) and 'end1' or 'end2', not removing this line.
Let me paste an 2 examples:
anything before
any string begin
few lines of content
end1
anything after
anything before
any... (4 Replies)
Discussion started by: meuser
4 Replies
5. Shell Programming and Scripting
File
6 dbnawldb010-b office Memphis_Corp_SQL_Diff Memphis-Corp-SQL-Inc-Application-Backup 03/09/11 03:24:04
42 luigi-b IPNRemitDB Memphis_Corp_SQL_Diff Memphis-Corp-SQL-Inc-Application-Backup 03/10/11 00:41:36
6 ebs-sqldev1-b IPNTracking Memphis_Corp_SQL_Diff... (4 Replies)
Discussion started by: ajiwww
4 Replies
6. UNIX for Dummies Questions & Answers
I have a file with words that begin with character #. Whenver that character is found that word should be deleted throughout the file. How do I do that in VIM.
e.g:
afkajfa ladfa ljafa #222222 kjafad ljl
afajkj kjlj uouu #44444 jlkj lkjl
Output should be
afkajfa ladfa ljafa kjafad... (1 Reply)
Discussion started by: osbourneric
1 Replies
7. Shell Programming and Scripting
Hi
I have files with names that contain the date in several formats as, YYYYMMDD, DD-MM-YY,DD.MM.YY or similar combinations.
I know if a file fits in one pattern or other, but i donīt know how to extract the substring contained in the file that matches the pattern.
For example, i know that
... (1 Reply)
Discussion started by: pjrm
1 Replies
8. Web Development
Hi,
I have rows like this.
Retractor muscle (PRM) of Helix pomatia
Genetic characterization of a prm- mutant
Values of PRM data.
Expression pattern of prmt5 in adult fish.
PRMT-5 negatively regulates DNA
genetic fusions of prM-E protein
Methylation of Xilf3 by Xprmt1b... (1 Reply)
Discussion started by: vanitham
1 Replies
9. UNIX for Advanced & Expert Users
HI....
It's fallow up file ..
#./show.sh click enter button.. i am gettng the fallowup file. its keep on running every time why because there are lots of users working on it.
In that file i want to search pattern between two words
for ex:
SELECT DISTINCT... (7 Replies)
Discussion started by: ksr.test
7 Replies
10. Shell Programming and Scripting
Hi All,
I have an input below. I tried to use the awk below but it seems that it ;s not working. Can anybody help ?
My concept here is to find the 2nd field of the last occurrence of such pattern " ** XXX ccc ccc cc cc ccc 2007 " . In this case, the 2nd field is " XXX ". With this "XXX" term... (20 Replies)
Discussion started by: Raynon
20 Replies