02-16-2006
If the character is \307
I am experiencing problem while executing the command :
awk '{c+=gsub(s,s)}END{print c}' s='character' filename
for character '\307'. could you please tell how to handle these type of characters.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
i have a string like echo "a|b|c" . i want to count the | symbols in this string . how to do this .plz tell the command (11 Replies)
Discussion started by: kamesh83
11 Replies
2. Shell Programming and Scripting
Hi Folks,
I have a input file of the below format.
~~~OLKIT~OLKIT~1~~TBD~BEST PAGER & WIRELESS~4899 COMMON MARKET PLACE~~~DUBLIN~KS~43016~I~Y~DIRECT~D~~0
BPGRWRLS~~~OLKIT~OLKIT~1~~TBD~BEST PAGER & WIRELESS~4899 COMMON MARKET PLACE~~~DUBLIN~KS~43016~I~Y~DIRECT~D~~0... (12 Replies)
Discussion started by: srikanthgr1
12 Replies
3. Shell Programming and Scripting
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)
Discussion started by: dcfargo
3 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I want to count the occurences of a specific word in a .txt file in bash shell.
Can somebody help me pleaze??
Thanks!!! (2 Replies)
Discussion started by: mskart
2 Replies
5. Shell Programming and Scripting
Hello,
I have a text file with n lines in the following format (9 column fields):
Example:
contig00012 149606 G C 49 68 60 18 c$cccccacccccccccc^c
I need to count the number of lower-case and upper-case occurences in column 9, respectively, of the... (3 Replies)
Discussion started by: s052866
3 Replies
6. Shell Programming and Scripting
We have a log file, the format is similar to this:
08/04/2011 05:03:08 Connection Success
08/04/2011 05:13:18 Connection Success
08/04/2011 05:23:28 Connection Fail
08/04/2011 05:33:38 Connection Success
08/04/2011 06:14:18 Connection Success
08/04/2011 06:24:28 Connection Fail
08/04/2011... (6 Replies)
Discussion started by: clu
6 Replies
7. UNIX for Advanced & Expert Users
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)
Discussion started by: janzper
1 Replies
8. Shell Programming and Scripting
Hello,
I try to sort results of occurences in an array by using awk but I can't find the right command. that's why I'm asking your help ! :)
Please see below the command that I run:
awk '{ for ( i=1; i<=length; i++ ) arr++ }END{ for ( i in arr ) { print i, arr } }' dictionnary.txt
... (3 Replies)
Discussion started by: destin45
3 Replies
9. UNIX for Dummies Questions & Answers
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)
Discussion started by: weslyarfan
5 Replies
10. Shell Programming and Scripting
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
CHARMAP(5) Linux Programmer's Manual CHARMAP(5)
NAME
charmap - character set description file
DESCRIPTION
A character set description (charmap) defines all available characters and their encodings in a character set. localedef(1) can use
charmaps to create locale variants for different character sets.
Syntax
The charmap file starts with a header that may consist of the following keywords:
<code_set_name>
is followed by the name of the character map.
<comment_char>
is followed by a character that will be used as the comment character for the rest of the file. It defaults to the number sign (#).
<escape_char>
is followed by a character that should be used as the escape character for the rest of the file to mark characters that should be
interpreted in a special way. It defaults to the backslash ().
<mb_cur_max>
is followed by the maximum number of bytes for a character. The default value is 1.
<mb_cur_min>
is followed by the minimum number of bytes for a character. This value must be less than or equal than <mb_cur_max>. If not speci-
fied, it defaults to <mb_cur_max>.
The character set definition section starts with the keyword CHARMAP in the first column.
The following lines may have one of the two following forms to define the character set:
<character> byte-sequence comment
This form defines exactly one character and its byte sequence, comment being optional.
<character>..<character> byte-sequence comment
This form defines a character range and its byte sequence, comment being optional.
The character set definition section ends with the string END CHARMAP.
The character set definition section may optionally be followed by a section to define widths of characters.
The WIDTH_DEFAULT keyword can be used to define the default width for all characters not explicitly listed. The default character width is
1.
The width section for individual characters starts with the keyword WIDTH in the first column.
The following lines may have one of the two following forms to define the widths of the characters:
<character> width
This form defines the width of exactly one character.
<character>...<character> width
This form defines the width for all the characters in the range.
The width definition section ends with the string END WIDTH.
FILES
/usr/share/i18n/charmaps
Usual default character map path.
CONFORMING TO
POSIX.2.
EXAMPLE
The Euro sign is defined as follows in the UTF-8 charmap:
<U20AC> /xe2/x82/xac EURO SIGN
SEE ALSO
iconv(1), locale(1), localedef(1), locale(5), charsets(7)
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
GNU
2016-07-17 CHARMAP(5)