Sponsored Content
Full Discussion: comm not working
Top Forums Shell Programming and Scripting comm not working Post 302192226 by drl on Tuesday 6th of May 2008 10:44:36 AM
Old 05-06-2008
Hi, era.
Quote:
Originally Posted by era
... A good safety measure is to use an explicit locale when using commands which care about collation order.
I don't think I have noticed that problem, but it sounds like a good idea. Rather than specify it individually for each command, I'll use the set, export, and report LC_ALL in my demonstration script templates, at least for a while.

The general problem seems like it would often be masked in threads in the forum because copy / paste will not transfer non-printing characters ... cheers, drl
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

comm ?!

Hi, I have two large files with uid's: - 581004 File1.txt - 292675 File2.txt I want to know which uid's are in File1.txt and not in File2.txt. I have used comm -23 File1.txt File2.txt. This should do the trick i thought. But in the output i keep having uid's in File1.txt that are also in... (8 Replies)
Discussion started by: tine
8 Replies

2. Shell Programming and Scripting

comm with a variable

Hello all, I have two flat files that are colon delineated and I am trying to run a compare (Solaris v8 ksh) of $1 within a script to access a mysql database based on the results. Unix is telling me that it has to have physical file names. Is there a way to run a compare using variables? This is... (3 Replies)
Discussion started by: gozer13
3 Replies

3. UNIX for Dummies Questions & Answers

Comm, command help

See my other post on sdiff .... I don't think sdiff is able to do what I want. The 'comm' command does what I need and works fine as far as the logic and results. The problem I'm having is with the output format, it outputs 3 columns of data, but because of the way it starts each line... (2 Replies)
Discussion started by: cowpoke
2 Replies

4. Shell Programming and Scripting

comm not working for this case. HELP!

I have two sorted files. newfile has records like: aaa|bbb|ccc||| ddd||eee|fff|| oldfile has records like: aaa|bbb|ccc| ggg||hhh|fff The output should like: ddd||eee|fff|| I use comm but it's not working for this case. comm -2 -3 newfile oldfile > difffile The difffile is the... (6 Replies)
Discussion started by: sslr
6 Replies

5. Shell Programming and Scripting

comm command

Hi I have issue with "comm " command file-1 ---- l65059 l65407 l68607 l68810 l69143 l71310 l72918 l73146 l73273 l76411 file-2 ----- (8 Replies)
Discussion started by: amitrajvarma
8 Replies

6. Shell Programming and Scripting

problem with using comm

hi, I have two unsorted files and want to delete the lines which are common to both. file 1: S1069656304010437 S1069656304010449 S1470204501005393 S1069656304010474 S0001209208001294 S0000000012345678 S0001457507000590 S0002641707000784 S1470204501005381 S0001457507000280... (4 Replies)
Discussion started by: jathin12
4 Replies

7. UNIX for Dummies Questions & Answers

help in comm command

Hi all, I need help in comm command , I am having 2 files . I have to display the common line in the two file only onnce and i have to also display the non common line as well. tmpcut1 -- First file cat tmpcut1 smstr_303000_O_432830_... f_c2_queue_sys30.sys30 RUNNING 10 1000... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

8. UNIX for Dummies Questions & Answers

help on COMM command please

could some one please explain with examples how comm -12 & comm -3 works. I am confused with manual page, Thankyou. (2 Replies)
Discussion started by: Ariean
2 Replies

9. UNIX for Dummies Questions & Answers

Need help with comm command

Hello , I am trying to get contents which are only present in a.csv ,so using comm -23 cat a.csv | sort > a.csv cat b.csv | sort > b.csv comm -23 a.csv b.csv > c.csv. a.csv SKU COUNTRY CURRENCY PRICE_LIST_TYPE LIST_PRICE_EFFECTIVE_DATE TG430ZA ZA USD DF ... (4 Replies)
Discussion started by: RaviTej
4 Replies

10. Linux

comm command help

The manual does not cover this very well. What do the following compares will do ? 1) comm -13 file1 file2: will it display what is in file2 not in file1? 2) comm -23 file1 file2: will it display what in 1 but not in 2 ? Thanks (5 Replies)
Discussion started by: mrn6430
5 Replies
wcscoll(3)						     Library Functions Manual							wcscoll(3)

NAME
wcscoll - Compares wide-character strings by using collation information LIBRARY
Standard C Library (libc) SYNOPSIS
#include <wchar.h> int wcscoll( const wchar_t *wcs1, const wchar_t *wcs2); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: wcscoll(): XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Points to a wide-character string. Points to a wide-character string. DESCRIPTION
The wcscoll() function compares the two wide-character strings pointed to by the wcs1 and wcs2 parameters based on the collation values specified by the LC_COLLATE category of the program's current locale. The wcscoll() function may be unsuccessful if the wide-character strings specified by the wcs1 or wcs2 parameters contain characters out- side the domain of the current collating sequence. NOTES
The wcscoll() function differs from the wcscmp() function in that the former compares wide characters based on locale-dependent collating order, while the latter compares wide characters based on machine collating order. The wcscoll() function is more expensive in terms of time than the wcscmp() function because of the overhead of obtaining the collation values from the current locale. 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
On successful completion, the wcscoll() function returns an integer whose value is greater than 0 (zero) if wcs1 is greater than wcs2, returns 0 (zero) if the strings are equivalent, and returns an integer whose value is less than 0 (zero) if wcs1 is less than wcs2. The sign of a nonzero return value is determined by the sign of the difference between the collation weights of the first pair of wide-charac- ter codes that differ in the objects being compared. The wcscoll() function indicates error conditions by setting errno; however, there is no return value to indicate an error. To check for errors, errno should be set to 0 (zero), then checked upon return from the wcscoll() function. If errno has a nonzero value, an error occurred. ERRORS
If the following condition occurs, the wcscoll() function sets errno to the corresponding value: The wide-character string pointed to by the wcs1 or wcs2 string contained characters outside of the domain of the collating sequence. RELATED INFORMATION
Functions: strcoll(3), wcscmp(3), wcsxfrm(3) Standards: standards(5) delim off wcscoll(3)
All times are GMT -4. The time now is 07:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy