in reply to one line for combining line
If you don't care about order:
$ sort -u tt.txt 123 133 3243 a b c
If you do:
$ perl -ne'$s{$_}++||print' tt.txt a b c 123 3243 133
Same, but one char shorter: (requires Perl 5.10 or higher)
$ perl -nlE'$s{$_}++||say' tt.txt a b c 123 3243 133
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: one line for combining line
by xiaoyafeng (Deacon) on Jul 06, 2010 at 04:35 UTC | |
by ikegami (Patriarch) on Jul 06, 2010 at 04:42 UTC | |
by xiaoyafeng (Deacon) on Jul 06, 2010 at 05:52 UTC |