Prasanthi Tenneti wrote: > > I want to add a word at each end of the line of a file. > my file is like this > > packet1.rpm > packet2.rpm > packet3.rpm > packet4.rpm > > I want to add 'Node' word at the end of each line. > So it should be like this > packet1.rpm node > packet2.rpm node > packet3.rpm node > packet4.rpm node
perl -pi -e's/$/ node/' yourfile.txt Or if you need to specify the "packet1.rpm" part: perl -pi -e's/^(packet\d\.rpm)$/$1 node/' yourfile.txt John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]