python -c "print('+'*100)"
head -c 100 /dev/zero |awk 'gsub(/./,"+")'
perl -le "print(q(+)x100)"
println("+"*100)
输出50个=的方法
-
echo "" | sed ':a; s/^/=/; /=\{50\}/b; ta'
-
sed ':a;s/^.\{0,49\}$/&=/;ta' <<<""
-
awk 'BEGIN{OFS="=";NF=50;print}'
-
awk 'BEGIN{while(n++<50)printf "=";print""}'
-
seq -s'a' 50 | tr -d '[0-9]'
-
for i in `seq 50`; do echo -n =; done
-
yes "=" | sed '50q' | tr -d '\n'
-
yes "=" | head -n 50 | tr -d "\n"
-
perl -le 'print "=" x 50'
-
python -c "print '='*50"
-
printf "%0050d\n" 0 | tr "0" "="
-
eval printf '%.0s=' {1..50}
-
str=$(printf "%*s" "50"); echo ${str// /=}
本文转自 wangergui 51CTO博客,原文链接:http://blog.51cto.com/wangergui/1926807,如需转载请自行联系原作者