in reply to Find & Replace

perl -i~ -pe 's/,+/,/g' your_filename_goes_here
--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re^2: Find & Replace
by mantra2006 (Hermit) on Aug 10, 2006 at 15:05 UTC
    Hello

    This command worked..is there any way to specify the
    line numbers so that only first line and last line of the
    file will be replaced
    Thanks & Regards

    Sridhar
      perl -i -pe '(1==$. or eof) && s/,,+/,/' file_name