[Fai-commit] r3745 - trunk/lib
Ingo Wichmann
iw at linuxhotel.de
Wed Aug 2 15:33:05 UTC 2006
fai-commit at lists.alioth.debian.org wrote:
> protocol=$(expr match "$FAI_CONFIG_SRC" '\(.*\)://.*')
> dir=$(expr match "$FAI_CONFIG_SRC" '.*://\(\S\+\)\s\+.*')
> module=$(expr match "$FAI_CONFIG_SRC" '.*://.*\s\+\([^=]*\).*')
Its usually better to avoid ".*" in regular expressions:
protocol=$(expr match "$FAI_CONFIG_SRC" '\([^:]*\)://.*')
dir=$(expr match "$FAI_CONFIG_SRC" '[^:]*://\(\S\+\)\s\+.*')
module=$(expr match "$FAI_CONFIG_SRC" '[^:]*://.*\s\+\([^=]*\).*')
Ingo
More information about the Fai-commit
mailing list