#!/usr/bin/perl $ifile=$ARGV[0]; $ofile=$ARGV[1]; $header=`sed -n '1p' $ifile` ; $data=`sed '1d' $ifile | sort -u` ; open(my $fh, '>', $ofile) or die "Could not open file '$ofile' $!"; print $fh $header; print $fh $data; close $fh; exit 0
In reply to Re: Remove Duplicate Lines
by Anonymous Monk
in thread Remove Duplicate Lines
by dcb0127
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |