im trying to write a bash script and i want it to be able to divide the screen in 2 sections and show a message on one of them and the output of a command in the other without having to split the terminal window just like htop or nvtop. I looked it up everywhere and im not getting a place to start.

top segment: 
echo "now we are executing x command"

bottom segment:
sudo apt update -y
#above command's output
blablablablabla updating this and that 
updated 
your repositories work 
blablablablabla

image for reference : htop divisory lines

i looked everywhere on google and couldnt get a starting point, I also search for a way to leave a static header on the terminal with the command output refreshing underneat but still no luck finding something useful

1

There are 1 best solutions below

0
On

Your reference image is for bashtop

That github project code would likely give you hints on how to proceed for what you want.