Mailinglist Archive: opensuse-packaging (205 mails)

< Previous Next >
Re: [opensuse-packaging] ANNOUNCE: systemd service packaging
Le lundi 26 septembre 2011 à 19:21 +0200, Jan Engelhardt a écrit :
On Monday 2011-09-26 19:03, Frederic Crozat wrote:

sysv_service=`echo $service | sed -e 's/\\.[a-z]*//g'`

What is it that is being stripped here? \.[a-z]* looks like it can wreak
havoc all over the string. I guess something like this goes faster:


Except I don't want to list all possible extensions units might have.

Well it does not just strip extensions, it strips everything after a dot:

Well, might just as well do "${x%.*}";

Thanks, I'll do that.

if not, $service should at least be quoted.

Not sure I'm following you here..

- sysv_service=`echo $service | sed -e 's/\\.[a-z]*//g'` \
+ sysv_service=$(echo "$service" | sed -e 's/\\.[a-z]*//g') \

Ok, with above change, this is no longer needed.

Frederic Crozat <fcrozat@xxxxxxxx>

To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >