shell--字符串拼接

时间:2021-09-11 19:13:06   收藏:0   阅读:44
#!/bin/bash

file_name=‘./test‘
text=‘(‘
for s in `cat $file_name`;do
    text=$text‘"‘$s‘",‘
done
text=${text%?}‘)‘

echo $text

 

原文:https://www.cnblogs.com/ai-tech/p/15253472.html

评论(0)
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!