Is it possible to partially clear the terminal?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Is it possible to partially clear the terminal?
# 1  
Old 05-06-2011
Is it possible to partially clear the terminal?

The clear command specifically says it can only clear the entire terminal display. There are no arguments. So I'm wondering if there are any work arounds.

Carriage return does not work for this as it only moves the cursor to the beginning of the line we're on. And obviously NL only goes down. If there was an escape character that could progress the cursor UP one line, like a reverse new line I feel like this could be possible more or less.

Anyone have any ideas?
# 2  
Old 05-06-2011
Good background reading is the unix manual pages for "tput" then "terminfo".
If you want to do clever things with the screen it is important to know exactly what terminal you have (or emulate) and to ensure that the value of $TERM is correct.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Sftp transfers file partially

Hi ALL, I have a shell script using except : #!/bin/bash HOST=abc.com USER=abc PASSWORD=123 SOURCE_FILE=file1.zip TARGET_DIR=/A/B/C /usr/bin/expect <<- EOF spawn /usr/bin/sftp $USER@$HOST expect "password:" send "$PASSWORD\r" expect "sftp>" send "cd patch1\n" ... (11 Replies)
Discussion started by: Asad
11 Replies

2. UNIX for Dummies Questions & Answers

Partially match and rank question

Hi I am processing some files but have difficulty to deal with this one, hope someone can help me,Thank you in advance. I have a file 1 like this file 1:aa|M30369.1| mfe: -15.1 kc b|BX930090.1| mfe: -10.2 kc GOOD mfe: -20.3 kc BAD3.2 mfe: -25.4 kc I also have a file 2 like this file2:GOOD... (8 Replies)
Discussion started by: yuejian
8 Replies

3. Shell Programming and Scripting

Command / script to partially rename file

Hi I have numerous files names product_host_result_B1000842.txt product_host_result_B1000847.txt product_host_result_C1000842.txt product_host_result_C1000848.txt etc. I need them renamed so that the 'product_host_result' becomes 'output_product_host' but the rest of the filename is... (6 Replies)
Discussion started by: Grueben
6 Replies

4. UNIX for Dummies Questions & Answers

Script partially executes??

Hi All, I am calling a shell script from another shell script, however, it only executes part of it (the echo commands only). What could be some causes for that? For example: ShellScriptA.sh: ... ... ... . ShellScriptB.sh ShellScriptB.sh contents: echo date echo... (7 Replies)
Discussion started by: DBnixUser
7 Replies

5. Shell Programming and Scripting

How to output the partially equals

Hello i have 2 files: a.out 10.1.1.1 james.franco 10.1.1.3 google.gol 10.1.1.14 yahoo.bol b.out 10.1.1.1 10.1.1.3 10.1.1.45 I need to see an output just with: 10.1.1.1 james.franco 10.1.1.3 google.gol Thankz in advance!! (2 Replies)
Discussion started by: danielldf
2 Replies

6. Shell Programming and Scripting

How to clear history logs of all terminal sessions

Hi, I would normally clear off the history entries from a terminal by using the following commands: > ~/.bash_history history -c But this will remove the entries of that particular session only. How to prune all the entries of all login sessions for a particular user in a system? N.B:... (3 Replies)
Discussion started by: royalibrahim
3 Replies

7. Shell Programming and Scripting

Clear Terminal After Exit

I have had a look around and can not find the answer, I dont think im searching for the right phrase. I have written a script to control common functions on my server, however when exiting the script the terminal starts directly below the script that was running... how can i clear this so it... (2 Replies)
Discussion started by: foz
2 Replies

8. UNIX for Dummies Questions & Answers

"@" will clear the current line in terminal

I just found that the current command line will be cleared when trying to input the "@" sign to the terminal. I checked current alias, but found nothing. Would you please provide some suggestion about it? (4 Replies)
Discussion started by: sleepy_11
4 Replies

9. AIX

logical volume partially mirrored

Hello I have a question On one of my aix servers if I type lsvg -l rootvg I got this 0516-1147 : Warning - logical volume waslv may be partially mirrored. waslv jfs2 277 477 3 open/syncd /usr/WebSphere If I type lslv -m waslv |more waslv:/usr/WebSphere... (4 Replies)
Discussion started by: lo-lp-kl
4 Replies

10. Shell Programming and Scripting

How to partially replace variable value?

I have variable $2 whose value is expdp_SDW_MSTR_VMDB.par I want to replace three characters from right (par) with (log) Input --> expdp_SDW_MSTR_VMDB.par Output --> expdp_SDW_MSTR_VMDB.log Thanks Deep (2 Replies)
Discussion started by: deep.singh
2 Replies
Login or Register to Ask a Question