9 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
Hi All,
I have problem in the middle of implementing to users, whereby the complaint is all about the decimal place which is too long. I need two decimal places only, but the outcome from command is always fixed to 6.
See the sample :
before:
Sort Total
Site Sort SortName Parts ... (3 Replies)
Discussion started by: horsepower
3 Replies
3. Shell Programming and Scripting
Im using the command below , but thats not the output that i want. it only prints the odd and even numbers.
awk '{if(NR%2){print $0 > "1"}else{print $0 > "2"}}'
Im hoping for something like this
file1:
Text hi this is just a test
text1 text2 text3 text4 text5 text6
Text hi... (2 Replies)
Discussion started by: invinzin21
2 Replies
4. Shell Programming and Scripting
Hi,
I have a simple problem but i guess stupid enough to figure it out. i have thousands rows of data. and i need to find match patterns of two columns and print the number of rows. for example:
inputfile
abd abp 123
abc abc 325
ndc ndc 451
mjk lkj... (3 Replies)
Discussion started by: redse171
3 Replies
5. Shell Programming and Scripting
I have logs files which are generated each day depending on how many processes are running. Some days it could spin up 30 processes. Other days it could spin up 50. The log files all have the same pattern with the number being the different factor. e.g.
LOG_FILE_1.log
LOG_FILE_2.log etc etc
... (2 Replies)
Discussion started by: atelford
2 Replies
6. 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
7. Shell Programming and Scripting
I want to search a bunch of files and list only those containing a minimum number of pattern matches. So if I want to identify files containing 3 (or more) instances of the pattern "said:" and I have file1 that contains the lines:
He said:
She said:
and file2 that contains the lines:
He... (3 Replies)
Discussion started by: stumpyuk
3 Replies
8. Shell Programming and Scripting
My input file:
<accession>Q91G55</accession>
<name>043L_IIV6</name>
<protein>
<recommendedName>
<location>
<position position="294"/>
</location>
<fullName>Uncharacterized protein 043L</fullName>
<accession>P18556</accession>
<name>1106L_ASFB7</name>
<protein>
<recommendedName>... (5 Replies)
Discussion started by: patrick87
5 Replies
9. Shell Programming and Scripting
Hi All,
as the title says I need to extract N lines after match number X of a pattern.
e.g.
111
xxx
xxx
111
yyy
yyy
111
www
www
111
zzz
zzz
I would like to extract the two lines after the second 111 occurrence.
I tried with grep but I didn't find any options to do that.
Any... (11 Replies)
Discussion started by: f_o_555
11 Replies