- or download this
1) perl -nle '$result .= " $_"; END{print $result}' data.txt
2) perl -e "chomp(@lines=<>); print join ' ', @lines" data.txt
- or download this
perl -e 'undef $/; $text=<>; $text =~ tr/\n//; 1 while $text =~ s/\b(
+\w+\d+\s*\d+\.\d+\.\d+\.\d+)\s*\1\b/$1/ig; print $text; $/="\n"; list
- or download this
use strict;
use warnings;
...
--output:--
S55 1.1.1.1 S66 2.2.2.2 S55 1.1.1.1
- or download this
perl -nle '$results{$_}=undef; END{print join " ", keys %results}' dat
+a.txt