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
.......... (1 Reply)
Discussion started by: Antonlee
1 Replies
3. Shell Programming and Scripting
I am trying to count records of particular format from a file and assign it to a variable. I tried below command
br_count=wc -l "inputfile.dat"| awk -F"|" '{if (NF != "14") print }'
but I amnot able to get it done. Please share me some idea how to get it done.
Thanks in advance (7 Replies)
Discussion started by: siteregsam
7 Replies
4. Shell Programming and Scripting
..... (3 Replies)
Discussion started by: elbee11
3 Replies
5. Shell Programming and Scripting
Hi Pls help in solving my doubt.Iam having file like below
file1.txt
priya
jenny
jenny
priya
raj
radhika
priya
bharti
bharti
Output required:
I need a output like count of repeated words with name for ex:
priya 3
jenny 2 (4 Replies)
Discussion started by: bha148
4 Replies
6. UNIX for Dummies Questions & Answers
Dear users,
I need to count the number of lines in a simple text file and print the number on the first line of that same file.
I know I can count the lines using
wc -l file.txt
this gives for example
100 file.txt
I need the number 100 to be printed at the very top of file.txt... (2 Replies)
Discussion started by: jenjen_mt
2 Replies
7. Red Hat
I am trying to count the number of columns in a delimited flat file. The record is tab delimited. When I use the command wc -w, I am getting unexpected results when the record contains a NULL value. I believe it is because there is a "word" missing.
The below example will return 4 words... (2 Replies)
Discussion started by: nmalencia
2 Replies
8. Shell Programming and Scripting
i use unix command to take the record count for a file1
awk 'END{print NR}' filename
i already have a file2 which conatin the count like
...
..
rec_cnt=100
..
..
I want to replace the record in the file2 using the record i take from file1.
suggest me some simple ways of doing it... (2 Replies)
Discussion started by: er_zeeshan05
2 Replies
9. UNIX for Dummies Questions & Answers
HI ,
I am new to shell scripting ,
I have a requirement that
I send a file for data quality ( original.csv) & i will be getting 4 files daily into a particular directory in return with cleansed data .
the files may be clean.csv,
unclean.csv ,
... (2 Replies)
Discussion started by: sirik
2 Replies
10. UNIX for Dummies Questions & Answers
How do I get the record count in an EBCDIC file on a Linux Box. :confused: (1 Reply)
Discussion started by: oracle8
1 Replies