Changing the way "more" works


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Changing the way "more" works
# 1  
Old 04-28-2005
Changing the way "more" works

Hi,

The "more" command is currently being used to display reports to users. However, "more" allows the user to shell out to the command prompt if they happen to type in "!" and they can also start editing the file if they type in "v". Is it possible to restrict users access to these by disabling the "!" and "v" options in "more"?
Otherwise, is there another command I can use which otherwise gives users the same look and feel to their reports as they are currently used to?
# 2  
Old 04-28-2005
see whether 'pg' command can solve your problem.
# 3  
Old 04-28-2005
You need to post a few clues with question. Like... What OS? What shell? etc.

My "more" gets its editor from the environment variable EDITOR. I don't see a shell escape being documented. Your "more" may use SHELL for that. Try changing these environment variables to /bin/false before invoking "more".
# 4  
Old 05-12-2005
Changing the way "more" works

Point taken Perderabo. It does help if I supply useful information such as you suggested. I'll keep this in mind for my next post.

Thanks for your suggestion, bhargav. I played around with "pg" and the closest I came to replicating the look and feel of the "more" command was when using the "-srnp" options. Unfortunately, there are still marked differences between "pg" and "more" which would pose problems for our users.
However, the good news is that I have found that setting the following variables in my script before the call to "more" essentially disables the "v" and "!" commands.
SHELL=exit
EDITOR=exit

Thanks once again for your feedback.
# 5  
Old 05-16-2005
Quote:
Originally Posted by barkerj
However, the good news is that I have found that setting the following variables in my script before the call to "more" essentially disables the "v" and "!" commands.
SHELL=exit
EDITOR=exit

Thanks once again for your feedback.
Try the following

cat $* |more

Jerardfjay
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

"Mv" command does not work in loop, but works manually

Hi there, this may be a beginner's error, but I've been unable to find a solution on my own and by googling, and now I am really stuck on it. I am simply trying to move directories called for example CAT_Run01.ica to a directory with the corresponding number, Run01, in the same directory. For... (2 Replies)
Discussion started by: andrevol
2 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. Solaris

Changing "rx_queue_number" in "ixgbe.conf". Reboot or Network Restart?

Hi all, First post here. Working on Solaris 10, on a Sun t4-4, need to change RX queue depth(ethernet, not HBA) and was wondering if i could get by with just restarting the network or if i should just bounce the whole shebang. Apologies if i missed a similar thread. if there is one, please... (2 Replies)
Discussion started by: caspnx
2 Replies

4. Red Hat

files having Script which works behind "who" & "w" commands

Dear All, plz print the path of files which have the script of "who" & "w" commands. thnx in advance. (6 Replies)
Discussion started by: saqlain.bashir
6 Replies

5. UNIX for Dummies Questions & Answers

1 SSH tunnel, 2 devices: 1 "just works," other gets challenged

summary: I have 2 devices on same LAN which tunnel through one gateway to a cluster, using ssh with public keys for password/passphrase-less login. I configured both devices, and those ssh configurations are nearly identical with regard to ssh. From either device I can shell into the cluster.... (2 Replies)
Discussion started by: TomRoche
2 Replies

6. UNIX for Dummies Questions & Answers

script works well but displays " line 6: =: No such file or directory"

strange :) can you tell why?:cool: #!/bin/bash echo " enter your age " read age if ; then echo " you do not have to pay tax " elif ]; then echo " you are eligible for income tax " else echo " you dont have to pay tax " fi (3 Replies)
Discussion started by: me.
3 Replies

7. 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

8. Shell Programming and Scripting

"ld.so.1" error using a cron job | works fine otherwise

Hi, A cron job CJ invokes a shell script SC. SC internally invokes multiple perl scripts. One of the perl scripts deals with Accurev (i am using Accurev CLI). The first accurev command encountered is accurev merge -i <<file_name>> (file name has absolute path) When I run the perl script or... (1 Reply)
Discussion started by: singh
1 Replies

9. UNIX for Advanced & Expert Users

"kill -14 pid" doesn't works on all processes !!

If I try to run "kill -14 pid", some processes in my application get terminated , while some keeps running. If SIGALRM signal is sent, they should make an exit. What's the reason any process keeps on running. (1 Reply)
Discussion started by: poojac
1 Replies
Login or Register to Ask a Question