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)
Hi,
I wanted to add a newline character after every 100 characters in a file using a awk or shell without reading each line of the file.
I want to run a command on the complete file.
This does based on a string but i want to add a new line after every 100 characters ir-respective of the... (3 Replies)
Hi,
I need add leading zeroes to a field in a file based on the character count. The field can be of 1 character to 6 character length. I need to make the field 14bytes.
eg:
8351,20,1
8351,234,6
8351,2,0
8351,1234,2
8351,123456,1
8351,12345,2
This should become.
... (3 Replies)
Hi,
I need help regarding counting specific word or character per line and validate it against a specific number i.e 10. And if number of character equals the specific number then that line will be part of the output.
Specific number = 6
Specific word or char = ||
Sample data:... (1 Reply)
i have a reqirement to adjust the data in a file based on a perticular character
the sample data is as below
483PDEAN CORRIGAN 52304037528955WAGES 50000
89BP ABCD MASTER352 5434604223735428 4200
58BP SOUTHERN WA848 ... (1 Reply)
Hello,
:wall:
I have a 12 column csv file. I wish to delete the entire line if column 7 = hello and column 12 = goodbye. I have tried everything that I can find in all of my ref books.
I know this does not work
/^*,*,*,*,*,*,"hello",*,*,*,*,"goodbye"/d
Any ideas?
Thanks
Please... (2 Replies)
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)
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)
Discussion started by: teokon90
10 Replies
LEARN ABOUT DEBIAN
dbswiss
DBSWISS(1) User Commands DBSWISS(1)NAME
dbSwiss - create DBM version of Swiss-Prot data
SYNOPSIS
/usr/share/librg-utils-perl/dbSwiss [OPTIONS]
/usr/share/librg-utils-perl/dbSwiss --datadir /data/swissprot --infile /data/swissprot/uniprot_sprot.dat
/usr/share/librg-utils-perl/dbSwiss [--help] [--man]
DESCRIPTION
dbSwiss creates DBM version of Swiss-Prot data. This procedure is to replace splitSwiss.pl. splitSwiss.pl saves Swiss-Prot records in
separate files resulting in over 13 million relatively tiny files that take very long to create and rsync. dbSwiss instead saves each
record into a DBM database that is optimized for fast retrieval.
OPTIONS -d, --datadir=path
directory of database files, default: '/mnt/project/rost_db/data/swissprot'
--debug
--nodebug
--first20
--nofirst20
process only first 20 records, for debugging
--help
-i, --infile=path
Swiss-Prot data flatfile, default: '/mnt/project/rost_db/data/swissprot/uniprot_sprot.dat'.
--man
--quiet
--noquiet
do not print progress status
--readback
--noreadback
read records back after storing and print them
--table
name of database table and consequently the base name of database files, default: 'dbswiss'
--version
-w, --workdir=path
Optional working directory. Automatically created and removed if not defined.
AUTHOR
Laszlo Kajan <lkajan@rostlab.org>
1.0.43 2011-11-28 DBSWISS(1)