代码: 全选
1 #!/bin/sh
2 set -x
3 line_length=80
4
5 out_file=`pwd`/bigfile
6 >$out_file
7 total_line=$1
8 line_count=0
9 char=x
10
11 while (( line_count < total_count ))
12 do
13 char_count=0
14 while (( char_count < line_length ))
15 do
16 echo -n "${char}" >> $outfile
17 echo -n "${char_count} "
18 $((char_count=char_count+1 ))
19 done
20 $((line_count=line_count+1))
21 echo >> $out_file
22 done
23 echo $out_file