Re: Input and output for program

Brian Carp (brian.carp@yale.edu)
Mon, 18 Jan 1999 23:08:00 -0500 (EST)

On Mon, 18 Jan 1999, Shawn Bayern wrote:

> A more general solution could combine the two cases (and a third, for .
> can, in principle, begin a path too) --
>
> set path = (`echo $path | sed 's/^\. //' | sed 's/ \. / /' | sed 's/ \.$//'
`)
>
> Anyone see an easy way to do it with one 'sed'?
>
> Shawn

I don't remember spaces sandwiching (how'd i do?) the . in all cases
either. Are you sure they're there? I would suggest somthing like:
sed 's/:[ ]*\.[ ]*//g'. I think that would replace a single dot, and the
'g' makes it global, so it will replace multiple occurences of . in the
path, if they exist. Take it with a grain of salt...

Brian

_____________________________________________________________
| Brian Carp | P.O.Box 202627 |
| Yale University | New Haven, CT |
| Calhoun College '01 | 06520-2627 |
| 203-436-0471 | brian.carp@yale.edu |
-------------------------------------------------------------