Utility to make the values of terminal-dependent capabilities and information available to the shell. Often used to set shell color.
Questions tagged [tput]
72 questions
0
votes
1 answer
tput sequence that results in no apparent change?
I frequently have to ssh to a remote system that, if faced with N minutes of inactivity (where N is rather small), will terminate my connection. I'm getting tired of being kicked off and losing my work/context just because, e.g., I went to look…

Phil
- 101
- 1
- 5
0
votes
1 answer
clear terminal screen but keep visual spacing
When I want to provide a visual break after a long list of output lines from a command I normally run clear so that the terminal will clear the screen, put my prompt back at 0,0 while also keeping the history (vs reset).
The problem is that when I…

mmlb
- 877
- 10
- 24
0
votes
1 answer
BASH tput error on stderr redirection
Writing a function that should display errors on terminal and save them to stderr
die () {
echo "$(tput setaf 1) ERROR: $*. Aborting... $(tput sgr 0)" > &2
exit 1
}
unfortunately this will generate
syntax error near unexpected token `&'
` …

melisc
- 3
- 3
0
votes
1 answer
Refresh Multi-Line Output in Perl
I'm working on a script that is meant to check a certain status, output the result, sleep for a short time and then start everything over again. The output consists of multiple lines and I want the script to update the output that means to print on…

hennes
- 9,147
- 4
- 43
- 63
0
votes
1 answer
Which open source program is similar to the Linux "dialog" command?
Dialog command is great command to view GUI dialog box
But the non positive of the dialog is that we cant to locate the GUI window on the top of the screen or in the lower screen
Dialog always show the dialog GUI in the central of the screen
First…

maihabunash
- 1,632
- 9
- 34
- 60
0
votes
1 answer
how to view two dialog box on the linux console? running on the same time?
I want to view on the Linux console two dialog windows on the same time
one window that view the progress BAR
and the second tailbox that view the logs are running.
The problem is that the dialog present in the central of the console
What I want is…

maihabunash
- 1,632
- 9
- 34
- 60
0
votes
1 answer
Changing colour scheme for Prod systems HP-UX
I want to change the color scheme to red when someone logs into the prod system. I achieved this by querying our central repository for prod servers and updating .kshrc as below -
host=hostname
...
...
search string using $hostname
env will be set…

Rahul Ghosh
- 1
- 2
0
votes
1 answer
Bash: "tput initc" doesn't seem to work
I'm working on a bash script in which I start off with some tput initc commands for specifying custom colours for use in the script. But when I run the script to test, it seems to just still be using Terminal.app's default "Basic" theme colours.…
user1282270
-1
votes
2 answers
Why do newlines break ANSI cursors?
In a contrived example, if I have the following:
sup="$(printf "\e[s" > /dev/tty; printf "one" > /dev/tty; printf "\e[u\e[Jtwo" > /dev/tty)"
The output will successfully erase one leaving only:
two
However, if I use echo "one" to print a newline…

balupton
- 47,113
- 32
- 131
- 182
-1
votes
2 answers
Fix for tput: No value for $TERM and no -T specified when running a remote shell script using SSH
I have a nodetimecheck.sh file on a server which has a command like this
echo
tput setaf 2; echo -n " What is my node's local time: "; tput setaf 7; date
When I login to my server with SSH and execute ./nodetimecheck.sh it displays…

Mirror Mirage
- 1,287
- 1
- 8
- 7
-3
votes
1 answer
Why \r required when using tput el1
While creating a countdown timer in bash, I came up with the following code:
for ((n=15; n > 0; n--)); do
printf "Reload | $n" && sleep 1
done
This works fine, it keeps adding the printf to the same line, as expected.
So I opened the…

0stone0
- 34,288
- 4
- 39
- 64
-3
votes
1 answer
Using Terminal Control Codes with C
I am interested in creating a terminal-based text interface in C without the use of a library like ncurses. I know that through using tput and a variety of escape codes, it is possible to create such an interface. However, I am uncertain of how to…

w m
- 493
- 1
- 5
- 7