M
M
Michael2020-02-25 14:03:41
bash
Michael, 2020-02-25 14:03:41

How to display hollow hourglass figure from pseudographics in bash?

Write a script that takes an odd integer N and displays
a figure (empty hourglass) made in pseudographics using N lines.
The number of characters in a line is equal to the line number. For N = 4:

5e54fcebeb8a2947620499.png
5e54fcfc81ef8522487101.png
5e54fd05e743f405028464.png

I wrote a code that outputs a "filled" hourglass
5e54fd98e09ac451811207.png
5e54feecd19f0582776794.png
code

, how to implement a program with an hourglass like in the photo?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pfg21, 2020-02-25
@pfg21

google "shell escape sequences".
https://www.opennet.ru/base/dev/console_ctl.txt.html
https://habr.com/ru/post/325082/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question