Result

WA

Duration

1276ms

Code [DL]

read h w< <(tr '\n' ' ')
a=$(printf %${w}s|tr ' ' \*)
((h-=2))
((w-=2))
b=\*$(printf %${w}s)\*
echo "$a"
printf %${h}s|sed "s/ /$b\n/g"
echo "$a"

stdin

63
63

stdout

*  *
*  *

stderr

/code.bash: line 1: /dev/fd/62: No such file or directory
/code.bash: line 1: tr: command not found
/code.bash: line 1: tr: command not found
/code.bash: line 2: tr: command not found