Skip to main content
1 of 3
Asturio
  • 121
  • 3

Bash and seq, 132 bytes

b(){ echo -n "|";for i in $(seq 3 $1);do echo -n "$2";done;echo "|";} r(){ b $1 "-";for i in $(seq 3 $2);do b $1 " ";done;b $1 "-";} 

Use calling r, like r 8 4:

|------| | | | | |------| 
Asturio
  • 121
  • 3