use expr command to support /bin/dash

Signed-off-by: Masatake YAMATO <yamato@redhat.com>