Skip to content

suggestion for plugin.sh:clean_fieldname #1650

@bokutin

Description

@bokutin

I noticed this when using plugins/munin_update.

name="$(clean_fieldname "$i")"

clean_fieldname 4thhost -> _thhost
clean_fieldname 5thhost -> _thhost

This does not work.

echo "$@" | sed -e 's/^[^A-Za-z_]/_/' -e 's/[^A-Za-z0-9_]/_/g' -e 's/^root$/__root/'

We feel the following should be done even if it affects us globally.
This would not be something to write into each plugin.

echo` "$@" | sed -e 's/^[0-9]/_&/' -e 's/^[^A-Za-z_]/_/' -e 's/[^A-Za-z0-9_]/_/g' -e 's/^root$/__root/'

We would appreciate your consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions