10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a file such as below:
0 0 . . 0 0
0 0 0 0 0 0
1 1 1 1 1 1
1 1 1 1 1 1
0 0 0 1 0 1I want to count the number of 0 and 1 in each line (. represents no data) and print them into two columns, that is:... (3 Replies)
Discussion started by: Homa
3 Replies
2. Shell Programming and Scripting
I have been working on this for a little while and have been unable to come to a solution. Any help would be appreciated. I am working on a UNIX workstation and have a 30-40 meg text file that I am working with. In my real file there is hundreds of Jobs. Example of input file;
misc logging data... (1 Reply)
Discussion started by: ny_evan
1 Replies
3. Shell Programming and Scripting
I have a list of URLs and I want to be able to count the number of instances of addresses ending in a certain TLD and output and sort it like so.
5 bdcc.com
48 zrtzr.com
49 rvo.com
Input is as so
ync.org
sduzj.edu
sduzj.edu
sduzj.edu
sduzj.edu
sduzj.edu
sduzj.edu
sduzj.edu... (1 Reply)
Discussion started by: Pjstaab
1 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I have a string like this 0:1:2:0:2:2:4:0:0:0:-200:500......
what i want is to break down how many different characters are there and their count. For example for above string it should display
0 - 5 times
1 - 1 times
2 - 3 times
4 - 1 times
.
.
.
I am stuck in writing... (8 Replies)
Discussion started by: exit86
8 Replies
5. UNIX for Dummies Questions & Answers
Hi All
I have a question.
I would like to edit some string characters by replacing with characters of choice located in another file. For example in sample file>S5_SK1.chr01
NNNNNNNNNNNNNNNNNNNCAGCATGCAATAAGGTGACATAGATATACCCACACACCACACCCTAACACTAACCCTAATCTAACCCTGGCCAACCTGTTT... (9 Replies)
Discussion started by: pawannoel
9 Replies
6. Fedora
Hi All,
I have a general difficulty in understanding how to control single elements within a string. An example,
XYZ1234 ABCD5678 My expected output is :
ABCD1234 XYZ5678 (swapping subset of string elements of choice)
XYZ37 ACBD1214 (making calculations... (6 Replies)
Discussion started by: pawannoel
6 Replies
7. Shell Programming and Scripting
How can I get my array to understand the double-quotes I'm passing into it are to separate text strings and not part of an element? here's what I'm working with...
db2 -v connect to foo
db2 -x "select '\"' || stats_command || '\",' from db2law1.parallel_runstats where tabname = 'BAZ'"
set... (4 Replies)
Discussion started by: djschmitt
4 Replies
8. Shell Programming and Scripting
Hi,
There is a variable f_name, it store some file names.
Value of f_name=a.sql b.sql c.sql.......
like this.
want to count how many file name the var f_name stores.
Without using loop is there any command to count that. (5 Replies)
Discussion started by: Dip
5 Replies
9. Shell Programming and Scripting
I would like to find a list of files in a directory less than 2 days old and put them into an array variable. And then search for each file in the array for a matching string say "Return-code= 0". If it matches, then display the array element with a message as "OK".
Your help will be greatly... (1 Reply)
Discussion started by: mkbaral
1 Replies
10. UNIX for Dummies Questions & Answers
Hello,
I am writing a shell script and I need to find a way to
count the number of whitespaces in a string.
Eg:
NAME="Bob Hope"
I am looking for a way to count the number of whitespaces in this string. So a command that would take this string and return 1.
Or take
"First Middle Last"... (3 Replies)
Discussion started by: kevin80
3 Replies