Sponsored Content
Top Forums Shell Programming and Scripting Context for use of [.symbol.] awk notation Post 302994557 by Corona688 on Friday 24th of March 2017 11:35:55 AM
Old 03-24-2017
In what context would awk use collation, though? > < for strings, or does it have other meaning?
 

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
wcsxfrm(3)						     Library Functions Manual							wcsxfrm(3)

NAME
wcsxfrm - Transforms wide-character strings for collation in the current locale LIBRARY
Standard C Library (libc) SYNOPSIS
#include <wchar.h> size_t wcsxfrm( wchar_t *ws1, const wchar_t *ws2, size_t n); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: wcsxfrm(): XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Contains a pointer to the destination wide-character string. Contains a pointer to the source wide-character string. Specifies the maxi- mum number of wide-character codes to place into the array specified by ws1. DESCRIPTION
The wcsxfrm() function is used to transform the wide-character string specified by the ws2 parameter into a string of wide-character codes based on the collation values of the wide characters in the current setting of the LC_COLLATE locale category. No more than n wide charac- ters (including the terminating null wide character) are copied into the array specified by the ws1 parameter. When two transformed wide- character strings are obtained and the transformed strings are compared using wcscmp(), the result is the same as that obtained by a direct call to wcscoll() on the two original wide-character strings. The application can call wcsxfrm() with ws1 as a null pointer to determine the number of wide characters to allocate for the ws1 parameter. For example, the following expression calculates the size of ws1: 1 + wcsxfrm(NULL, ws2, 0) As shown in this example, the n parameter must be 0 (zero) when ws1 is a null pointer. When operating on overlapping strings, the behavior of the wcsxfrm() function is unreliable. NOTES
If an application does multiple comparisons based on the current locale's collation values and uses the same set of text strings, the wcsxfrm() transformation function in conjunction with the wcscmp() function may be more efficient than the wcscoll() collation function. This is because the string is transformed based on the locale tables only once. However, the transformation function must convert all characters in the string for each level of a multilevel collation. In comparison, the collation function stops comparing characters at the first inequality. These tradeoffs make the most efficient method for a specific application dependent on the number of repeated comparisons of strings within the set, the number of collation levels for the current locale, and the values of the strings within the set. RETURN VALUES
If the ws1 parameter is a wide-character null pointer, the wcsxfrm() function returns the number of wide-character elements (not including the terminating null wide character) required to store the transformed wide-character string. If the count specified by the n parameter is sufficient to hold the transformed string in the ws1 parameter (including the terminating null wide character) the return value is set to the actual number of wide-character elements placed in the ws1 parameter, not including the terminating null wide character. If the return value is equal to or greater than the value specified by the n parameter, the contents of the array pointed to by the ws1 parameter are indeterminate. On error, the wcsxfrm() function returns (size_t)-1 and sets errno to indicate the error. ERRORS
If any the following conditions occur, the wcsxfrm() function sets errno to the corresponding value: The ws2 parameter contains wide-char- acter codes outside the domain of the collating sequence defined by the current locale. [Tru64 UNIX] There was insufficient memory avail- able to allocate temporary storage for this operation. RELATED INFORMATION
Functions: setlocale(3), string(3), wcscmp(3), wcscoll(3) Standards: standards(5) delim off wcsxfrm(3)
All times are GMT -4. The time now is 11:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy