# Arg1: line
function get_label()
{
- frame=$(echo "${1}" | ${SED} "s/.*label:\(.*\),geometry.*/\1/g")
-
- if [ x"${frame}" = x"" ]; then
- echo ""
- return 1
- else
- echo "${frame}"
- return 0
- fi
+ local token
+ token=$(echo "${1}" | ${SED} "s/.*label:\(.*\),geometry.*/\1/g")
+ echo "${token}"
}
# Arg1: line
function get_frame_id()
{
frame=$(echo "${1}" | grep -e "label:[0-9]\+," | ${SED} "s/.*label:\([0-9]\+\),.*/\1/g")
-
- if [ x"${frame}" = x"" ]; then
- echo ""
- else
- echo "${frame}"
- fi
+ echo "${frame}"
}
# Arg1: line