For counting the occurences of specific character in the file
I am issuing the command
grep -o 'character' filename | wc -w
It works in other shells but not in HP-UX as there is no option -o for grep.
What do I do now? (9 Replies)
I'm trying to count the number of 2 specific characters in a very large file. I'd like to avoid using gsub because its taking too long.
I was thinking something like:
awk '-F' { t += NF - 1 } END {print t}' infile > outfile
which isn't working
Any ideas would be great. (3 Replies)
Hello everybody!
I am quit new here and hope you can help me.
Using an awk script I am trying to extract data from several files. The structure of the input files is as follows:
TimeStep parameter1 parameter2 parameter3 parameter4
e.g.
1 X Y Z L
1 D H Z I
1 H Y E W
2 D H G F
2 R... (2 Replies)
hi I want to write a script which count the number of subdirectories in the current root directory that contain more than a specified number of files of a specific type. Is there an easy way to do this?
Thanks
Robert (2 Replies)
I need a script which should watch a directory for a file with specific directory.
If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column.
The file should be moved to another directory and the a... (8 Replies)
Hi all, I have a file that contains characters. How do I get total of spesific character from that file and save the count to a variable for doing for calculation.
data.txt
1
2
2
2
2
3
3
4
5
6
7
8
5
4
3
4 (5 Replies)
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
So I'm trying to search for the top 10 or 15 items under a directory by file type. I want to run a command on a directory and get something like the following:
Example of expected output.. .PDF: 100, .txt: 95, .word: 80..
What would be the best way of going about this? I've searched around... (2 Replies)
Discussion started by: shackle101
2 Replies
LEARN ABOUT DEBIAN
srf_info
srf_info(1) Staden io_lib srf_info(1)NAME
srf_info - Lists information about the contents of an SRF file
SYNOPSIS
srf_info [-l bitmap] srf_archive ...
DESCRIPTION
srf_info lists some simple frequency metrics on the contents of an SRF file, both in terms of how many traces there are and the sort of
data held within them.
For efficiencies sake some control is given over which statistics to gather and display. This is controlled by the -l level parameter. The
value is the summation of one or more of the following values, representing the data to display.
1 Count of good/bad reads.
2 Counts and compressed size for selected chunk types.
4 Trace count and trace name prefix for each trace_header.
8 Base count.
OPTIONS -l bitmap
Controls which statistics to gather and display. Bitmap is a value from 0 to 15 (1+2+4+8) as described in the DESCRIPTION section
above.
EXAMPLES
To count the total number of good and bad reads along with a break down of trace names per SRF data-block-header we would use bitmap values
1 and 4 combined.
srf_info -l 5 foo.srf
To count the total number of reads for all srf files in a directory.
srf_info -l 1 *.srf
AUTHOR
Steven Leonard, Wellcome Trust Sanger Institute
September 19 srf_info(1)