10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I need to egrep patterns in a file and limit number of matches to print for each matched pattern.
-m10 option is not working out in my sun solaris 5.10
Please guide me the options to achieve.
if i do head -10 , i wont be getting all pattern match results as output since for a... (10 Replies)
Discussion started by: ananan
10 Replies
2. Shell Programming and Scripting
I am trying to combine lines with these conditions:
1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text.
2. If condition1 is met then continue to combine lines through a line that ends with a semicolon.
3. Ignore case when matching patterns and remove any... (5 Replies)
Discussion started by: Wes Kem
5 Replies
3. Shell Programming and Scripting
Hello Experts , require help . See below output:
File inputs
------------------------------------------
Server Host = mike
id rl images allocated last updated density
vimages expiration last read <------- STATUS ------->... (4 Replies)
Discussion started by: tigerhills
4 Replies
4. Shell Programming and Scripting
Hi,
Do anybody know how to use awk to count the pattern at specific column?
Input file
M2A928K 419 ath-miR159a,gma-miR159a-3p,ptc-miR159a 60 miR235a
.
.
Output file
M2A928K 419 ath-miR159a,gma-miR159a-3p,ptc-miR159a 60 miR235a 3
.
.
I plan to count how many "miR" in column 3... (2 Replies)
Discussion started by: cpp_beginner
2 Replies
5. Shell Programming and Scripting
I have
2013-06-11 23:55:14 1Umexd-0004cm-IG <= user@domain.com
I need sed/awk operation on this, so that it should print the very next pattern only after the the pattern mach <=
ie only print user@domain.com (7 Replies)
Discussion started by: anil510
7 Replies
6. Shell Programming and Scripting
Data:
Pattern Data Data Data
Data Data Data
Data Data Data
...
With awk, how do I print the pattern matching line, then the subsequent lines following the pattern matching line. Varying number of lines following the pattern matching line. (9 Replies)
Discussion started by: dmesserly
9 Replies
7. UNIX for Dummies Questions & Answers
Dear All,
Hv a very specific requirement.
I have a very large text file and in which I have to match a pattern and insert a line above and below.
Eg:
My file
cat test
date1
date2
date3
date4
I need to match 'date3' and insert "Reminder1" above date3 and insert 'reminder2'... (4 Replies)
Discussion started by: gokulj
4 Replies
8. Shell Programming and Scripting
Hi,
I know how to use awk to search some expressions like five consecutive numbers, , this is easy.
However, how do I make awk print the pattern that is been matched?
For example:
input: usa,canada99292,japan222,france59664,egypt223
output:99292,59664 (6 Replies)
Discussion started by: grossgermany
6 Replies
9. Shell Programming and Scripting
Hi,
I have a xml file
<cisco:name>
<cisco:mdNm>Cisco Device 7500 A Series</cisco:mdNm>
<cisco:meNm>10.1.100.19</cisco:meNm>
<cisco:ehNm>/shelf=1</cisco:ehNm>
<cisco:subname>
<cisco:meNm>10.1.100.19</cisco:meNm>
<cisco:sptp>Cisco PortA Series</cisco:sptp>
... (11 Replies)
Discussion started by: bhagirathi
11 Replies
10. Shell Programming and Scripting
I have a file nbu_faq.txt (Question/answer) which looks like this
What I am trying to do is write out each question in a file1.txt and than the question/answer in a file2.txt
like this
file1.txt
Q: What is nbu?
Q: What is blablabla...?
Q: Why ....?
file2.txt
Q: What is nbu?
A:... (4 Replies)
Discussion started by: nymus7
4 Replies