1 |
On Mon, Dec 12, 2005 at 05:52:56PM -0800, Penguin Lover Daevid Vincent squawked: |
2 |
> Is there any recommended text viewer/editor whereby I can easily step |
3 |
> through the files (previous/next file), read .gz files, jump to the end of a |
4 |
> file, and most importantly, delete the current file? |
5 |
|
6 |
Perhaps less with the LESSOPEN and LESSCLOSE environmental variables |
7 |
set? Try this: |
8 |
|
9 |
put the following in /root/portlogclose.sh |
10 |
|
11 |
contents of /root/portlogclose.sh |
12 |
--------------------------------- |
13 |
#! /bin/sh |
14 |
rm -i $2 |
15 |
--------------------------------- |
16 |
|
17 |
chmod that 700 |
18 |
|
19 |
and do the following: |
20 |
|
21 |
# LESSOPEN="echo %s" LESSCLOSE="/root/portlogclose.sh %s %s" less /var/log/portage/* |
22 |
|
23 |
It should prompt you everytime you move between files whether you want |
24 |
the current file deleted or not. Just type Y or N and enter. The keys |
25 |
won't echo onto the screen. |
26 |
|
27 |
W |
28 |
-- |
29 |
Faye: You almost had a date! But you got dumped at the last minute |
30 |
in favor of an epiphany. |
31 |
Sortir en Pantoufles: up 30 days, 21:54 |
32 |
-- |
33 |
gentoo-user@g.o mailing list |