+set_mac2host() +{
- local queues
- # use "," replace " "
- queues=${queue/ /,}
btw, ${aa/ /,} will only replace first space, and will only replace one space. ${aa/ /,}: "a b c" => "a,b c" ${aa// /,}: "a b c" => "a,b,c" ${aa// /,}: "a b c" => "a,,b,,c"
maybe you can use the follow method: echo $yca | sed -r 's/ +/,/g'
-------- Thanks Yu Chuan
- echo $queues
- curl -X PUT "http://$%7BSCHED_HOST:-172.17.0.1%7D:$%7BSCHED_PORT:-3000%7D/set_host_mac?ho..."
+} +set_mac2host
del_host_mac() { @@ -33,7 +42,7 @@ trap del_host_mac EXIT tbox_group=$hostname fi
- host=${tbox_group%%--*}
host=${tbox_group%.*}
create_yaml_variables "$LKP_SRC/hosts/${host}"
-- 2.23.0