#!/bin/sh
ids="1,2,3,4,5";
var=`echo "$ids" | awk -F ', ' '{print $0} ' | sed "s/,/ /g "`;
for list in $var
do
echo $list
done
shell分割字符串
最新推荐文章于 2024-06-19 01:14:02 发布
#!/bin/sh
ids="1,2,3,4,5";
var=`echo "$ids" | awk -F ', ' '{print $0} ' | sed "s/,/ /g "`;
for list in $var
do
echo $list
done