Preventing screen redraw when "more" exits


 
Thread Tools Search this Thread
Operating Systems AIX Preventing screen redraw when "more" exits
# 1  
Old 05-23-2011
Preventing screen redraw when "more" exits

In previous releases of AIX (<5.3) the "more" command didn't redraw the screen upon exit. This helped when searching in a text document or man page because one could look for the relevant part of it, exit and use the left-over at the screen as reference for typing the next command.

Alas, this behaviour has changed: upon exiting "more" the screen is restored to what it was before invoking "more", thereby erasing exactly the information one was looking for. I was searching for a remedy and found out the following:

"more" is configured by an environment variable "MORE", which can be set - depending on which scope it should have - in "/etc/environment", one users ".kshrc" script or at the command line. Add/execute the following line:

Code:
MORE="-W notite" ; export MORE

(In "/etc/environment" you don't need the "export")

Now, if one knows how to accomplish the same for the exit of "vi" (or "view") I'd be glad to hear the solution.

I hope this helps.

bakunin
# 2  
Old 05-23-2011
This happened to me when we upgraded from 5.3 to 6.1. If you are using xterm emulation, change your env var TERM from xterm to xterm-r5. To learn more about this subject, look up "alternative screen" and xterm FAQ.
This User Gave Thanks to binlib For This Post:
# 3  
Old 05-24-2011
Many thanks for this info, i wasn't aware of that. I tried it and it worked well.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies

2. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. Shell Programming and Scripting

The pipe not use "tee" to print on the screen for specific function

I have code fragment like { aa bb cc } > $LOG aa bb cc, all call function "ff", I want "ff" to print on the screen,but others do not print on the scree, is there a method? I can't use "tee", becasue tee I meet the write "error" ff() { echo "hello" } (2 Replies)
Discussion started by: yanglei_fage
2 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

7. UNIX for Dummies Questions & Answers

Preventing wildcard expansion in "read"

Hi, I'm trying to use "read" to read in SQL lines and then apply to UDB. However KSH is expanding the *'s in the SQL into a list of all the files in the current directory... Anyway to turn this off? while read SQLStatement do echo "Running : " $SQLStatement... (8 Replies)
Discussion started by: gaijin 06
8 Replies

8. Shell Programming and Scripting

preventing "break" in a script

Not sure if I am using the correct terminology: I have a user setup in a menu. I want to let the user browse a file using the pg. I want to prevent the person from doing <ctrl>c and being able to exit the script to the command line. How do I do this? (6 Replies)
Discussion started by: MizzGail
6 Replies
Login or Register to Ask a Question