1. 拼接字符串*
#!/bin/sh write_log(){ local up_name=$1 local num=${#string} while [ $num -le 256 ]; do up_name="$up_name*" num=$(($num + 1)) done echo $up_name } write_log "wang"
输出:
wang*****************************************************************************************************************************************************************************************************************************************************************