#!/usr/bin/perl
# The Missing Textutils, Ondrej Bojar, obo@cuni.cz
# http://www.cuni.cz/~obo/textutils
#
# 'suffix' appends ARG1 at the end of every line.
#
# $Id: suffix,v 1.5 2009-04-02 11:58:45 bojar Exp $
#

use strict;
use Getopt::Long;

my $tab = 0;
GetOptions("tab"=>\$tab);

my $suffix = shift;
die "usage: suffix <prefix>  < infile   > outfile" if ! defined $suffix;

$suffix =~ s/\\t/\t/g;
$suffix =~ s/\\n/\n/g;
$suffix =~ s/\\\\/\\/g;
$suffix = "\t$suffix" if $tab;
while (<>) {
  chomp;
  print $_.$suffix."\n";
}
