Sponsored Content
Top Forums Shell Programming and Scripting Context for use of [.symbol.] awk notation Post 302994487 by ctsgnb on Thursday 23rd of March 2017 12:01:59 PM
Old 03-23-2017
Hi Corona,

Thank for your time but i already know how do the associativ array works.Smilie

In fact i was refering and wondering about to the "collating" notation mentionned here

it says "A collating symbol is a multi-character sequence that should be treated as a unit"

so if [.my_word.] is more or less processed the same way as /my_word/ , i don't see the added value of this specific notation so i was wondering what is behind "treated as a unit" ...

So if someone has a good example of a context in which such notation is necessary, i would be glad to have a look at it, because i think i miss something here. Smilie

Last edited by ctsgnb; 03-23-2017 at 01:18 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

keep context in awk

here is a data file. ------------------------------------- KSH, CSH, BASH, PERL, PHP, SED, AWK KSH, CSH, BASH, PERL, PHP, BASH, PERL, PHP, SED, AWK CSH, BASH, PERL, PHP, SED, KSH, CSH, BASH, PERL, PHP, SED, AWK ------------------------------------- My desired output is... (2 Replies)
Discussion started by: VTAWKVT
2 Replies

2. Shell Programming and Scripting

Awk symbol for last column

Hi , I have a bunch of files with different # of columns but I want to write a single awk script. What is the awk symbol for last column? say '{print $lastcol}' or something (3 Replies)
Discussion started by: grossgermany
3 Replies

3. Shell Programming and Scripting

Turning off exponential notation in awk

I have various numbers that I'm printing out from a statistical summary script. I'd like it to stop using exponential format. Of course, I can use printf with 'd' and 'f' and various parameters to specify a format, but then it has other undesirable effects, like tacking on extra 0's or truncating... (0 Replies)
Discussion started by: treesloth
0 Replies

4. Solaris

/usr/lib/passwdutil.so.1: symbol __nsl_fgetspent_r: referenced symbol not found

deleteing post (0 Replies)
Discussion started by: dshakey
0 Replies

5. Shell Programming and Scripting

Convert decimal notation to ANSI point code notation

wondering if anyone has any thoughts to convert the below thru a shell script Convert decimal signalling point notation to ANSI point code notation There is a site that does that conversion but i need to implement the solution in a shell script.....Thoughts.... OS: Solaris 9 ... (4 Replies)
Discussion started by: aavam
4 Replies

6. Shell Programming and Scripting

Get rid of awk notation

echo 0.633588 1875 | awk '{print $1 * $2 * 1024}' is there a better way to run the above command? it keeps printing out in notation and i do not want that at all. when i run the above, i get: 1.21649e+06 OS: linux language:bash (1 Reply)
Discussion started by: SkySmart
1 Replies

7. Shell Programming and Scripting

Perl: scientific notation to decimal notation

hello folks, I have few values in a log which are in scientific notation. I am trying to convert into actual decimal format or integer but couldn't able to convert. Values in scientific notation: 1.1662986666666665E-4 2.0946799999999998E-4 3.0741333333333333E-6 5.599999999999999E-7... (2 Replies)
Discussion started by: scriptscript
2 Replies

8. Shell Programming and Scripting

[Solved] awk Errors on notation

can someone spot what i'm doing wrong here: awk 'BEGIN{printf("%0.2f", 1 / 2649320) * 100}' i get this error: awk: line 1: syntax error at or near * then i do this and get the answer i'm trying to avoid: awk 'BEGIN{print(1 / 2649320) * 100}' 3.77455e-05 (7 Replies)
Discussion started by: SkySmart
7 Replies

9. Shell Programming and Scripting

Help with filter result (scientific notation) by using awk

Input file: data1 0.05 data2 1e-14 data1 1e-330 data2 1e-14 data5 2e-60 data5 2e-150 data1 4e-9 Desired output: data2 1e-14 data1 1e-330 data2 1e-14 data5 2e-60 data5 2e-150 I would like to filter out those result that column 2 is less than 1e-10. Command try: (1 Reply)
Discussion started by: cpp_beginner
1 Replies

10. Shell Programming and Scripting

Questions related to if in awk context and if without awk context

I wrote this code, questions follow #! /bin/bash -f # Purpose - to show how if syntax is used within an awk clear; ls -l; echo "This will print out the first two columns of the inputted file in this directory"; echo "Enter filename found in this directory"; read input; ... (11 Replies)
Discussion started by: Seth
11 Replies
COLLDEF(1)						    BSD General Commands Manual 						COLLDEF(1)

NAME
colldef -- convert collation sequence source definition SYNOPSIS
colldef [-I map_dir] [-o out_file] [filename] DESCRIPTION
The colldef utility converts a collation sequence source definition into a format usable by the strxfrm() and strcoll() functions. It is used to define the many ways in which strings can be ordered and collated. The strxfrm() function transforms its first argument and places the result in its second argument. The transformed string is such that it can be correctly ordered with other transformed strings by using strcmp(), strncmp(), or memcmp(). The strcoll() function transforms its arguments and does a comparison. The colldef utility reads the collation sequence source definition from the standard input and stores the converted definition in filename. The output file produced contains the database with collating sequence information in a form usable by system commands and routines. The following options are available: -I map_dir Set directory name where charmap files can be found, current directory by default. -o out_file Set output file name, LC_COLLATE by default. The collation sequence definition specifies a set of collating elements and the rules defining how strings containing these should be ordered. This is most useful for different language definitions. The specification file can consist of three statements: charmap, substitute and order. Of these, only the order statement is required. When charmap or substitute is supplied, these statements must be ordered as above. Any statements after the order statement are ignored. Lines in the specification file beginning with a '#' are treated as comments and are ignored. Blank lines are also ignored. charmap charmapfile Charmap defines where a mapping of the character and collating element symbols to the actual character encoding can be found. The format of charmapfile is shown below. Symbol names are separated from their values by TAB or SPACE characters. Symbol-value can be specified in a hexadecimal (x??) or octal (???) representation, and can be only one character in length. symbol-name1 symbol-value1 symbol-name2 symbol-value2 ... Symbol names cannot be specified in substitute fields. The charmap statement is optional. substitute "symbol" with "repl_string" The substitute statement substitutes the character symbol with the string repl_string. Symbol names cannot be specified in repl_string field. The substitute statement is optional. order order_list Order_list is a list of symbols, separated by semi colons, that defines the collating sequence. The special symbol ... specifies, in a short-hand form, symbols that are sequential in machine code order. An order list element can be represented in any one of the following ways: o The symbol itself (for example, a for the lower-case letter a). o The symbol in octal representation (for example, 141 for the letter a). o The symbol in hexadecimal representation (for example, x61 for the letter a). o The symbol name as defined in the charmap file (for example, <letterA> for letterA 23 record in charmapfile). If character map name have > character, it must be escaped as />, single / must be escaped as //. o Symbols a, , f, , , v are permitted in its usual C-language meaning. o The symbol chain (for example: abc, <letterA><letterB>c, xf1bxf2) o The symbol range (for example, a;...;z). o Comma-separated symbols, ranges and chains enclosed in parenthesis (for example ( sym1, sym2, ... )) are assigned the same primary order- ing but different secondary ordering. o Comma-separated symbols, ranges and chains enclosed in curly brackets (for example { sym1, sym2, ... }) are assigned the same primary ordering only. The backslash character is used for continuation. In this case, no characters are permitted after the backslash character. DIAGNOSTICS
The colldef utility exits with the following values: 0 No errors were found and the output was successfully created. !=0 Errors were found. FILES
/usr/share/locale/<language>/LC_COLLATE The standard shared location for collation orders under the locale <language>. SEE ALSO
mklocale(1), setlocale(3), strcoll(3), strxfrm(3) BSD
January 27, 1995 BSD
All times are GMT -4. The time now is 09:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy