18 lines
292 B
Bash
18 lines
292 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
function repeat() {
|
||
|
n="${1}"
|
||
|
string="${2}"
|
||
|
printf "%${n}s" | tr " " "${string}"
|
||
|
}
|
||
|
|
||
|
function main() {
|
||
|
buffer_size="${1}"
|
||
|
address="${2}"
|
||
|
filler="$(repeat "${buffer_size}" A)"
|
||
|
newline="\n"
|
||
|
printf "%s%b%b" "${filler}" "${address}" "${newline}"
|
||
|
}
|
||
|
|
||
|
main "${@}"
|