Different behavior of LC_COLLATE in AIX & LINUX


 
Thread Tools Search this Thread
Operating Systems AIX Different behavior of LC_COLLATE in AIX & LINUX
# 1  
Old 02-03-2010
Different behavior of LC_COLLATE in AIX & LINUX

1. I have created following files in both AIX & Linux
touch a A b B c C x X y Y z Z

2. In AIX

$ LC_COLLATE=en_US ; export LC_COLLATE
$echo [a-z]
$ a b c x y z


3. In LINUX
$ LC_COLLATE=en_US ; export LC_COLLATE
$ echo [a-z]
$ a A b B c C x X y Y z

Could anyone please explain the difference in behavior...
Thanks for your help
# 2  
Old 02-03-2010
Different behavior of LC_COLLATE in AIX & LINUX

In linux ,it is character case insensitive...so when u echoed it displays all alphabets....
# 3  
Old 02-03-2010
OSX (BSD Darwin) Example

FYI, on Darwin BSD (Apple OSX)

Code:
apple:$ touch a A b B c C x X y Y z Z
apple:$ LC_COLLATE=en_US ; export LC_COLLATE
apple:$ echo [a-z]
a b c x y z
apple:$

# 4  
Old 02-03-2010
On Linux, using bash
Code:
> touch a A b B c C x X y Y z Z
> LC_COLLATE=en_US; export LC_COLLATE
> echo [a-z]
a A b B c C x X y Y z
>

On Linux, using ksh93:
Code:
$ touch a A b B c C x X y Y z Z
$ LC_COLLATE=en_US; export LC_COLLATE
$ echo [a-z]
a b c x y z
$

Seems to be more of an shell than OS issue.
# 5  
Old 02-03-2010
Alternative could be...

On Linux
Code:
 
$ ls
a  A  b  B  c  C  x  X  y  Y  z  Z
 
$ LC_COLLATE=en_US ; export LC_COLLATE
 
$ echo [[:lower:]]
a b c x y z
 
$ echo [[:upper:]]
A B C X Y Z
 
$ echo [A-Z]
A b B c C x X y Y z Z
 
$ echo [a-z]
a A b B c C x X y Y z

# 6  
Old 02-03-2010
Thank you all for the explanations.....
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Do we have generic solution get process start time in AIX & Linux

I wish to get the process start time on AiX and Linux using the same command / script. I'm able to get the process start time in Linux using the below command: cat /proc/<pid>/stat | grep Modify The same does not work for AiX 6.1 systems. Can you please let me know the command to get... (4 Replies)
Discussion started by: mohtashims
4 Replies

2. AIX

[ASK] - AIX Fibre Channel behavior

Hello all, Let me introduce about the context and my environment. We have an AIX 6.1 system, it has 4 FC channels / > lsdev -Cc adapter | grep fcs fcs0 Available 23-T1 Virtual Fibre Channel Client Adapter fcs1 Available 23-T1 Virtual Fibre Channel Client Adapter fcs2 Available 23-T1... (14 Replies)
Discussion started by: Phat
14 Replies

3. UNIX and Linux Applications

Xalan & Xerces issues for Oracle Linux 6.6 & Solarisstudio12.3 C++ compiler for Linux

Hi Team, I am facing issue while using Xalan & Xerces for my application. Below are my environment details i am using :- Platform:- Oracle Linux 6.6 Compiler :- solarisstudio12.3 C++ compiler for Linux Below are the versions of Xalan & Xerces source code used to build the shared object... (0 Replies)
Discussion started by: agrachirag
0 Replies

4. Shell Programming and Scripting

Printf behavior on AIX

command: $ printf 'u1u1.%*s' 7 so if i run the above command on a linux box, i get the expected output of: jserver@jserver-VirtualBox:~$ printf 'u1u1.%*s' 7 u1u1. jserver@jserver-VirtualBox:~$ jserver@jserver-jserver:~$ it puts 7 spaces after the u1u1. but when i run it... (4 Replies)
Discussion started by: SkySmart
4 Replies

5. Red Hat

Difference b/n AIX & Red Hat Linux Commands

Hi All, The scripts developed in AIX can be executed in Red Hat Linux too? Because, we are migrating OS from AIX to LINUX. Will there be any differences in commands? Thanks in advance!!! Regards, U (2 Replies)
Discussion started by: unme
2 Replies

6. UNIX for Dummies Questions & Answers

Show HBA WWN on AIX & Linux

Hi all, I have an environment with Aix and Linux severs zoned to tape drives I'd like to list HBAs WWN on my servers which are zoned to the drives. Thanks (1 Reply)
Discussion started by: Sara_84
1 Replies

7. Programming

Named pipe behavior in Linux

Hi All ! I try to collect importent events from syslog and in my syslog conf, there is something like this: *.* |/logs/ipes/SLpipe1 I have a program, which opens this pipe and reads the messages from it. But how this pipe works ? Where can I probably read something about the details,... (3 Replies)
Discussion started by: mabra
3 Replies

8. Shell Programming and Scripting

LC_COLLATE=1

Hello everyone! I've been analyzing a foreign script and has come across the following line: ... LC_COLLATE=1 sort -T "${tmp_dir}" "-t " -k1,1 -k2,2 | \ ... And I can't understand how `LC_COLLATE=1' influences the behavior of the `sort' utility. I mean it is usually written... (3 Replies)
Discussion started by: sidorenko
3 Replies

9. Linux

Wierd cursor behavior in Linux

I Have a COBOL application running over iscobol platform in Linux server. we run Red Hat Enterprise Linux WS release 4 (Nahant Update 4) Kernel \r on an \m and the command "uname -a" gave me that: Linux trilinux 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux ... (1 Reply)
Discussion started by: TheReverend
1 Replies

10. Solaris

msginfo_msgmnb & IO behavior

Gurus, On a SUN Fire 150 k with Solaris 8 installed, the (wio ratio) suddenly stepped to reach 90s % of the CPU utilization. Tracking the changes on the box, we got that only the kernel parameter (msginfo_msgmnb) was increased from its default value to another larger value. Given that the... (1 Reply)
Discussion started by: Negm
1 Replies
Login or Register to Ask a Question