10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I could calculate the length of entire fasta sequences by following command,
awk '/^>/{if (l!="") print l; print; l=0; next}{l+=length($0)}END{print l}' unique.fasta
But, I need to calculate the length of a particular fasta sequence specified/listed in another txt file. The results to to be... (14 Replies)
Discussion started by: dineshkumarsrk
14 Replies
2. Shell Programming and Scripting
Hello,
I have been working on Awk/sed one liner which counts the number of occurrences of '|' in pipe separated lines of file and delete the line from files if count exceeds "17".
i.e need to get records having exact 17 pipe separated fields(no more or less)
currently i have below :
awk... (1 Reply)
Discussion started by: ketanraut
1 Replies
3. Shell Programming and Scripting
What I'm trying to accomplish. I receive a Header and Detail file for daily processing. The detail file comes first which holds data, the header is a receipt of the detail file and has the detail files record count. Before processing the detail file I would like to put a wrapper around another... (4 Replies)
Discussion started by: pone2332
4 Replies
4. UNIX for Dummies Questions & Answers
I want to get count on number of records in a few folders by running grep command for more than two columns in a row of fixed length file.
suppose if i have a fixed length file has 5 columns and I want to see the record counts for country =can and province = bc and time stamp <= 12 feb 2013... (14 Replies)
Discussion started by: princetd001
14 Replies
5. Shell Programming and Scripting
Hi,
I have a issue, I need to loop through a comma delimited file and check for the length which exceeds specified length , if Yes truncate the string.
But my problem is , I do not have to check for all the fields and the field lenght is not same for all the fields.
For ex:
Say my line... (9 Replies)
Discussion started by: rashmisb
9 Replies
6. Shell Programming and Scripting
Morning, every one.
I have a file like this:
AAEQGAGNQPQH 27
AAGETQY 51
AAGGSSYNEQF 12
AAGGYEQY 72
AAGLEAKNIQY 159
AAGPYEQY 26
AAGQDYNSPLH 45
AAGQGGEQF 1587
AAGREGGNTEAF 4
AAGSPQH 3
AAGSYEQY 45
AAGTGAYEQY 19
AAGTSGNNEQF 79
AAGWNTEAF 37
I want to count the string length of the... (2 Replies)
Discussion started by: xshang
2 Replies
7. Shell Programming and Scripting
Hi, Gurus,
I have a requirement which need count string length.
eg.
abc
bcde
defge
want to get following:
abc 3
bcde 4
defge 5
:wall:
thanks in advance! (6 Replies)
Discussion started by: ken002
6 Replies
8. Shell Programming and Scripting
Hi,
I have created one shell script in which it will count number of "~" tilda charactors from each line of the file.But the problem is that i need to count each line count individually, that means. if line one contains 14 "~"s and line two contains 15 "~"s then it should give an error msg.each... (3 Replies)
Discussion started by: Ganesh Khandare
3 Replies
9. Shell Programming and Scripting
I've got a file that would have lines similar to:
12345678 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
23456781 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
34567812 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00
45678123 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 xx.00... (10 Replies)
Discussion started by: Cailet
10 Replies
10. UNIX for Dummies Questions & Answers
Please can anyone tell me, how to count the string length (2 Replies)
Discussion started by: Anshu
2 Replies