Sponsored Content
Top Forums Shell Programming and Scripting difference in unix vs. linux sort Post 302446446 by Corona688 on Wednesday 18th of August 2010 05:36:36 PM
Old 08-18-2010
Code:
$ sort -u < file.txt
US;BSU2; ;LHZ;2008-12-31;17:41:00;2999-12-31;23:59:59
US;BSU2;00;LHZ;2006-07-26;17:41:00;2008-12-31;23:59:59
US;BSU2;10;LHN;2006-07-26;17:41:00;2999-12-31;23:59:59
US;BSU2;HR;LHE;2006-06-01;00:00:00;2999-12-31;23:59:59
US;BSU2;HR;LHN;2006-06-01;00:00:00;2999-12-31;23:59:59
US;BSU2;HR;LHZ;2006-06-01;00:00:00;2999-12-31;23:59:59
US;BSU2;XX;LHE;2006-07-26;17:41:00;2999-12-31;23:59:59
US;KSU1; ;LHZ;2008-12-31;17:41:00;2999-12-31;23:59:59
US;KSU1;00;LHZ;2006-07-26;17:41:00;2008-12-31;23:59:59
US;KSU1;10;LH2;2006-07-26;17:41:00;2999-12-31;23:59:59
US;KSU1;HR;LH1;2006-06-01;00:00:00;2999-12-31;23:59:59
US;KSU1;HR;LH2;2006-06-01;00:00:00;2999-12-31;23:59:59
US;KSU1;HR;LHZ;2006-06-01;00:00:00;2999-12-31;23:59:59
US;KSU1;XX;LH1;2006-07-26;17:41:00;2999-12-31;23:59:59
$ sort -t';' -u < file.txt
US;BSU2; ;LHZ;2008-12-31;17:41:00;2999-12-31;23:59:59
US;BSU2;00;LHZ;2006-07-26;17:41:00;2008-12-31;23:59:59
US;BSU2;10;LHN;2006-07-26;17:41:00;2999-12-31;23:59:59
US;BSU2;HR;LHE;2006-06-01;00:00:00;2999-12-31;23:59:59
US;BSU2;HR;LHN;2006-06-01;00:00:00;2999-12-31;23:59:59
US;BSU2;HR;LHZ;2006-06-01;00:00:00;2999-12-31;23:59:59
US;BSU2;XX;LHE;2006-07-26;17:41:00;2999-12-31;23:59:59
US;KSU1; ;LHZ;2008-12-31;17:41:00;2999-12-31;23:59:59
US;KSU1;00;LHZ;2006-07-26;17:41:00;2008-12-31;23:59:59
US;KSU1;10;LH2;2006-07-26;17:41:00;2999-12-31;23:59:59
US;KSU1;HR;LH1;2006-06-01;00:00:00;2999-12-31;23:59:59
US;KSU1;HR;LH2;2006-06-01;00:00:00;2999-12-31;23:59:59
US;KSU1;HR;LHZ;2006-06-01;00:00:00;2999-12-31;23:59:59
US;KSU1;XX;LH1;2006-07-26;17:41:00;2999-12-31;23:59:59

I'm guessing that maybe, those spaces aren't actually spaces. Try transferring the data with scp instead of copy-paste.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

difference between unix and linux?

Ok, I'm confused. Can someone answer these (stupid) questions please for me? 1. What is the difference between unix and linux? 2. Is FreeBSD a unix distribution? 3. If not, then what is Unix? I actually gone to Unix.com because I thought this is it's official website where I could download... (1 Reply)
Discussion started by: RellioN
1 Replies

2. UNIX for Dummies Questions & Answers

Difference between UNIX and Linux

OK, I've used various versions of UNIX(Solaris, HPUX, etc..) over the years. Now the organization I work for is leaning towards more Linux based systems(Redhat, Suse, etc..) I do see differences in in comands and how to accomplish basic adminstration, but nothing mind blowing. So, what is it... (5 Replies)
Discussion started by: pbonilla
5 Replies

3. UNIX for Advanced & Expert Users

What is the difference between Unix & linux

:confused: Hi All Can anyone help me in finding the answer of the question mentioned below. What is the difference between Unix & linux ? Thanks in Advance to all CSaha (1 Reply)
Discussion started by: csaha
1 Replies

4. AIX

difference between AIx and Linux and Unix

Sir , Can any body explain the difference between linux , Unix and AIx on command Reference all the command on AIx and unix is same or not please reply (2 Replies)
Discussion started by: arif185
2 Replies

5. UNIX for Dummies Questions & Answers

difference between unix and linux

Hi I am new to linux I have dout waht is the difference between UNIX and LINUX Is there any soft for insatallation for UNIX OS Thanks (0 Replies)
Discussion started by: sanjaya
0 Replies

6. UNIX for Dummies Questions & Answers

Difference between UNIX and Linux

hi experts please tell me the real difference between unix and linux at kernel structure (1 Reply)
Discussion started by: linurag
1 Replies

7. Shell Programming and Scripting

UNIX compare, sort lines and append difference

Hi, I have a file that needs to be converted: content is: a, b, 4 a ,b, 5 x, y, 1 a, b, 1 x, y, 3 how can i get: a, b, 1|4|5 x,y 1|3 (1 Reply)
Discussion started by: nike27
1 Replies

8. Shell Programming and Scripting

UNIX compare, sort lines and append difference

To make it easier, i gave following example. It is not homework or classwork. Instead, i have a huge csv file dump from tsql with 15 columns and around 300 rows. I was able to extract content that needs to be really converted. Here is the extract: ES FP,B1ES FP,70000,I,SL22,SL22 (70000) ES... (0 Replies)
Discussion started by: nike27
0 Replies

9. Shell Programming and Scripting

UNIX compare, sort lines and append difference

To make it easier, i gave following example. It is not homework or classwork. Instead, i have a huge csv file dump from tsql with 15 columns and around 300 rows. I was able to extract content that needs to be really converted. Here is the extract: ES FP,B1ES FP,70000,I,SL22,SL22 (70000) ES... (8 Replies)
Discussion started by: nike27
8 Replies
Encode::Arabic::ArabTeX::RE(3pm)			User Contributed Perl Documentation			  Encode::Arabic::ArabTeX::RE(3pm)

NAME
Encode::Arabic::ArabTeX::RE - Deprecated Encode::Arabic::ArabTeX implemented with regular expressions REVISION
$Revision: 162 $ $Date: 2006-12-16 01:16:10 +0100 (Sat, 16 Dec 2006) $ SYNOPSIS
use Encode::Arabic::ArabTeX::RE; $string = decode 'arabtex-re', $octets; $octets = encode 'arabtex-re', $string; DESCRIPTION
Deprecated method using sequential regular-expression substitutions. Limited in scope over the ArabTeX notation and non-efficient in data processing, still, not requiring the Encode::Mapper module. EXPORTS & MODES Exports as if "use Encode" also appeared in the package. Experimental and incomplete support for conversion modes is provided, see Encode::Arabic::ArabTeX. SEE ALSO
Encode::Arabic::ArabTeX AUTHOR
Otakar Smrz, <http://ufal.mff.cuni.cz/~smrz/> eval { 'E<lt>' . ( join '.', qw 'otakar smrz' ) . "x40" . ( join '.', qw 'mff cuni cz' ) . 'E<gt>' } Perl is also designed to make the easy jobs not that easy ;) COPYRIGHT AND LICENSE
Copyright 2003-2006 by Otakar Smrz This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-01-18 Encode::Arabic::ArabTeX::RE(3pm)
All times are GMT -4. The time now is 05:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy