var21=`echo $vvar|awk -F ',' '{print $1}'` echo $var21 var31=`echo $var21|awk -F ':' '{print $2}'` echo $var31 var22=`echo $vvar|awk -F ',' '{print $2}'` echo $var22 var32=`echo $var22|awk -F ':' '{print $2}'` echo $var32 vv=`echo $var21|grep 'floor'` echo $vv if [[ $vv ]]; then floor=$var31 hotelid=${var32%\}*} else floor=${var32%\}*} hotelid=$var31 fi flo=`echo ${floor}|awk 'gsub(/^ *| *$/,"")'|sed $'s/\'//g'` hot=`echo $hotelid|awk 'gsub(/^ *| *$/,"")'` echo roslaunch blackpearl bp_web.launch map_file:=/opt/bp/maps/$hot/$flo/map.yaml