[pkg-cryptsetup-devel] Bug#600522: Better solution

Raoul Bönisch jkl345 at alice-dsl.net
Sun Dec 12 21:27:02 UTC 2010


Hi again again.

A way better solution might be this:

OWNER=$(ls -l "$key" | sed 's/^[^[:space:]]\{10,12\}[[:space:]]\+[^[:space:]]\+[[:space:]]\+\([^[:space:]]\+\).*/\1/'

It's more future proof than the original method, cause it only
looks at space and non-space characters and at most counts them.
So any change in output which does not change space/non-space
pattern will not make sed notice the user.

Greets,

Raoul Bönisch






More information about the pkg-cryptsetup-devel mailing list