Re: Remove first comma in a file

From: Alan Connor (zzzzzz_at_xxx.yyy)
Date: 02/27/04


Date: Fri, 27 Feb 2004 21:58:20 GMT

On Fri, 27 Feb 2004 16:18:22 -0500, Dale DeRemer <dderemer_nospam@agmc.org> wrote:
>
>
> I have a file of the format:
>
> 12,Smith, Bob
> 34,Jones, Eve
> 56,Doe, John
>
> What I want to do is replace the first comma with another character giving:
>
> 12%Smith, Bob
> 34%Jones, Eve
> 56%Doe, John
>
> Any suggestions?
>
>

Open the file in ed and enter:

g/,/s//\%/
wq

AC

-- 
ed(1) Check out the original tutorials by Brian W.
Kernighan at the Ed Home Page  http://tinyurl.com/2aa6g


Relevant Pages

  • Re: Remove first comma in a file
    ... > I have a file of the format: ... > 12,Smith, Bob ... > 34,Jones, Eve ... > 56,Doe, John ...
    (comp.unix.shell)
  • Remove first comma in a file
    ... What I want to do is replace the first comma with another character giving: ... 12%Smith, Bob ... 34%Jones, Eve ... 56%Doe, John ...
    (comp.unix.shell)
  • Re: Jazz Guitarists that played for Monkees records
    ... Hal Blaine, Earl Palmer, Sharkey Hall, Jesse Sailes, John Guerin, ... Gibbons, Bob Bain, Dennis Budimer, John Gray, Bill Pitman, Al Casey, Al ... Hendrikson, Irving Ashby, Mundell Lowe, Mike Anthony, Lou Morell, Al Viola, ... Ray Pohlman, Arthur Wright, Nick Bonney, Toots Thielemans, Don Peake, ...
    (rec.music.makers.guitar.jazz)
  • Re: The infinite spinning rainbow wheel
    ... In addition to what John said ... ... > option only to find myself staring at the spinning beachball again. ... >> Hi Bob: ... >> The beachball is simply Word telling you it is "waiting for the system". ...
    (microsoft.public.mac.office.word)
  • Re: FS PINBALL MACHINES
    ... John P. Dayhuff wrote: ... > i'm wrong Bob. ... rare Gottlieb EM games come up on ebay or Mr. Pinball for sale. ...
    (rec.games.pinball)