Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Repeat-a-string/UNIX-Shell/repeat-a-string-1.sh
Normal file
1
Task/Repeat-a-string/UNIX-Shell/repeat-a-string-1.sh
Normal file
|
|
@ -0,0 +1 @@
|
|||
printf "ha"%.0s {1..5}
|
||||
2
Task/Repeat-a-string/UNIX-Shell/repeat-a-string-2.sh
Normal file
2
Task/Repeat-a-string/UNIX-Shell/repeat-a-string-2.sh
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
i=5
|
||||
printf "ha"%.0s {1..$i}
|
||||
2
Task/Repeat-a-string/UNIX-Shell/repeat-a-string-3.sh
Normal file
2
Task/Repeat-a-string/UNIX-Shell/repeat-a-string-3.sh
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
i=5
|
||||
eval "printf 'ha'%.0s {1..$i}"
|
||||
5
Task/Repeat-a-string/UNIX-Shell/repeat-a-string-4.sh
Normal file
5
Task/Repeat-a-string/UNIX-Shell/repeat-a-string-4.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
reprint() {
|
||||
typeset e="$(sed -e 's,%,%%,g' -e 's,\\,\\\\,g' <<<"$1")"
|
||||
eval 'printf "$e"%.0s '"{1..$2}"
|
||||
}
|
||||
reprint '% ha \' 5
|
||||
2
Task/Repeat-a-string/UNIX-Shell/repeat-a-string-5.sh
Normal file
2
Task/Repeat-a-string/UNIX-Shell/repeat-a-string-5.sh
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
len=12; str='='
|
||||
repeat $len printf "$str"
|
||||
2
Task/Repeat-a-string/UNIX-Shell/repeat-a-string-6.sh
Normal file
2
Task/Repeat-a-string/UNIX-Shell/repeat-a-string-6.sh
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
width=72; char='='
|
||||
head -c ${width} < /dev/zero | tr '\0' "$char"
|
||||
Loading…
Add table
Add a link
Reference in a new issue