In the answer to this question, it uses the following (simplified): But that tput sgr0 resets all of the text attributes. I'd like to output colou ...
In the answer to this question, it uses the following (simplified): But that tput sgr0 resets all of the text attributes. I'd like to output colou ...
I have a Bash script which asks a user to input text. It displays the question and answer within a line-drawing character menu 'panel', like so: Ev ...
i want to rewrite first line but tput is removing all lines instead of first line im testing this cl=$(tput ed) tput sc echo 'line1____' echo 'line2 ...
I have a bash script and I want to be able to highlight critical errors when they occur. To that end I wrote the simple function below error() { # se ...
While creating a countdown timer in bash, I came up with the following code: for ((n=15; n > 0; n--)); do printf "Reload | $n" && sle ...
I am trying to do work in all subfolders in parallel and describe a status per folder once it is done in bash. suppose I have a work function which c ...
I want to delete everything after the cursor; not just the current line, but every remaining characters after the current position. For example of tp ...
Git Bash is pretty sluggish overall (compare 1.082s of average runtime under WSL/Ubuntu vs 4.460s in MinTTY). I've narrowed down a whopping 1.479s to ...
I executed following code on bash on the terminal which have LINES=50. The result of 'tput lines' command varied. I have no idea to explain this resul ...
I'm using the Ruby Net:SSH lib to do a ssh connection to a remote PC and then execute a remote cmd. When I start my SSH connection I have no issue but ...
I know that I can use the below command to blink a prinf or an echo command but how to stop it after a while or after a process is complete? I am writ ...
How can I update multi lines in python after print them? Like this example: Something like tput ( https://linux.die.net/man/1/tput ) inside python ...
$ cat test.sh #!/bin/bash sc=$(tput sc) rc=$(tput rc) printf "$sc%s\n" "Type word" read -r word printf "$rc%s\n" "Type word (again)" read -r word_co ...
I'm trying to get the width of the current terminal window in a script and use 80 as a fallback in case that isn't possible. I thought that's pretty s ...
I am using a while loop to perform an ffmpeg operation that makes a bunch of files, and I want an indicator at the bottom of the screen that says what ...
Several *NIX commands, such as screen, man, vim and others, create a temporary canvas/screen/overlay in a shell environment. When such programs execut ...
I'm trying to create an update-able progress status. In order to do that, I need to be able to clear the last output in its entirety so that I can upd ...
I'm a little confused about the interaction between tput and terminal sizes. It seems that the behavior of tput depends on the shell under which it is ...
How do I set a variable with color and left align with bash Example: red=$(tput setaf 1) green=$(tput setaf 2) normal=$(tput sgr0) if [ $process_s ...
I have a nodetimecheck.sh file on a server which has a command like this When I login to my server with SSH and execute ./nodetimecheck.sh it displ ...