10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Need to count consecutive characters in a string and give the output as below
i/p=aaaabbcaa
o/p=a4b2c1a2 (10 Replies)
Discussion started by: prasanna2166
10 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
I want count number of characters / find the length of the 'wc -l' output
This is the command
bash-3.2$ gzcat /home/sid/file1.dat |wc -l
830752
So final out I want is 6 i.e lenght of 830752
I tried with awk
bash-3.2$ gzcat /home/sid/file1.dat |wc -l | awk '{print length ($0)... (3 Replies)
Discussion started by: sidnow
3 Replies
4. 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
5. UNIX for Dummies Questions & Answers
Hi everyone, and thanks after all
I'm a biologist and i have to extract information from one text. The text is something like this
1023 A A 56 0 cc...,,,,..gg..Cc.c,,c..CC..,,
1024 T T 86 0 ..,,,..aaAA..,,aAA,,a,,A,,a
1025 G G 125 0 ... (5 Replies)
Discussion started by: beajorrin
5 Replies
6. Shell Programming and Scripting
Hi i have data like
abchd 124 ldskc aattggcc
each separated by tab space i want to count number of characters in 4th column and print it in new column with tabspace for every line can anyone help me how to do it.
Thanks. (3 Replies)
Discussion started by: bhargavpbk88
3 Replies
7. UNIX for Dummies Questions & Answers
to delete the duplicate characters in a file I used this code
cat file.txt|tr -s ""
tell the other ways using sed
command to count of duplicate characters
thanks:) (0 Replies)
Discussion started by: tsurendra
0 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
I like to know how to get the count of each character in a given word. Using the commands i can easily get the output. How do it without using the commands ( in shell programming or any programming)
if you give outline of the program ( pseudo code )
i used the following commands
... (3 Replies)
Discussion started by: itkamaraj
3 Replies
9. Shell Programming and Scripting
I have a file that I need to count the number of "Y"s in the file, but just the "Y"s that fall between certain columns. Like:
file1:
1234567890123456789012345
BBBBBBYBBBBYBBYBBYBBYBBB
I want to count the 'Y's between 17 and 21 = 2 "Y"s
Thanks (12 Replies)
Discussion started by: jbt828
12 Replies
10. Shell Programming and Scripting
Hello, Member or professional
need help how to count characters by line of file
Example of the file is here
cdr20080817164322811681txt
cdr20080817164322811txt
cdr20080817164322811683txt
cdr20080817164322811684txt
I want to count the characters by line of file . The output that I... (4 Replies)
Discussion started by: ooilinlove
4 Replies