[Kolab-devel] Kolab Build Scripts
Maarten Stolte
maarten.stolte at papuaos.org
Thu May 29 14:32:44 CEST 2003
Hi,
file=`echo $file | perl -e "@line = <>; foreach (@line) { chomp; s/\r//;
print; }"`
works, note I had to add the "` at the end.
Maarten
On Thu, 2003-05-29 at 16:14, Stephan Buys wrote:
> %0D is carriage return or \r as we know it:
>
> Try the following:
>
> file=`echo $file | perl -e "@line = <>; foreach (@line) { chomp; s/\r//; print; }
>
>
>
> On Thursday 29 May 2003 11:57, Maarten Stolte wrote:
> > Hi,
> >
> > nearly there:
> > Downloading: patch-2.5.9-20030520.src.rpm
> > --14:01:25--
> > ftp://ftp.openpkg.org/current/SRC/patch-2.5.9-20030520.src.rpm%0D
> >
> > If I'd know what the %0D's are, i could strip it in perl
> >
> > Maarten
> >
> > On Thu, 2003-05-29 at 15:35, Stephan Buys wrote:
> > > My suspicion is that there is a better way (or utility) to do it.
> > >
> > > Try the following as a substitute for line 51:
> > >
> > > file=`echo $file | perl -e "@line = <>; foreach (@line) { chomp; print; }
> > > "`
> > >
> > > This perl one-liner might work on both (though it failed on my machine
> > > ??)
> > >
> > > On Thursday 29 May 2003 11:35, Maarten Stolte wrote:
> > > > On Thu, 2003-05-29 at 15:06, Stephan Buys wrote:
> > > > > Hi Maarten,
> > > > >
> > > > > Do you have sed installed?
> > > >
> > > > yes i do: GNU sed version 3.02.
> > > > For my RHL9 workstation with sed version 4.0.5 it works...
> > > > What we need it seems is either something that works for both, or
> > > > detect the sed version...
> > > >
> > > > > I try to get rid of the carriage return and
> > > > > newline characters (%0D in the examples below) using sed. It seems
> > > > > that for some reason this is not working. There might be a better way
> > > > > to do it.
> > > > >
> > > > > Check line 51.
> > > >
> > > > _______________________________________________
> > > > Kolab-devel mailing list
> > > > Kolab-devel at intevation.org
> > > > https://kroupware.org/mailman/listinfo/kolab-devel
> >
> > _______________________________________________
> > Kolab-devel mailing list
> > Kolab-devel at intevation.org
> > https://kroupware.org/mailman/listinfo/kolab-devel
More information about the devel
mailing list