less - The opposite of more ChangeLog

HOWTO


# less 406
# ========
# Slackware 8.1's 'less' package includes version 374, 9.0 and 9.1's include
# 381, 10.0, 10.1, and 10.2's include 382, and 11.0's and 12.0's include 394
#
# 9.0 and up include a lesspipe.sh script written by Patrick Volkerding
# (the author of Slackware).  Below I include a different one with support
# for more types of files (more as of the last time I checked).

# If you ever want to uninstall less, or clean up files from an old version
# before installing a new one, skip down to the bottom for instructions.

# Prerequisites:
# grep
# ncurses

cd
test -f installed/less-406.tar.gz && mv installed/less-406.tar.gz .
test ! -f less-406.tar.gz &&
wget http://www.greenwoodsoftware.com/less/less-406.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "less-*" -exec rm -r {} \;
tar xzvf ~/less-406.tar.gz
cd less-406
test $UID = 0 && chown -R root:root .
find -type f -exec chmod 644 {} \;
chmod +x ./configure ./mkinstalldirs

./configure --prefix=/usr --sysconfdir=/etc
make

# Become root to install it
su

test -x /sbin/removepkg && /sbin/removepkg less
make install
( cd /usr/bin ; strip less lesskey lessecho )
chown -R $USER .

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/less-*.tar.*
mv less-406.tar.gz installed/


# lesspipe 1.53
# =============
# lesspipe.sh is a script that less can use to let you do funky things like
# this:
#   less ~/tarball.tar.bz2
# (that does the same as running 'tar tjvf ~/tarball.tar.bz2 | less')

# Prerequisites (AFAIK all optional):
# file
# zsh
# ksh
# lsbom (I think this is an Apple util)
# bzip2
# Debian's dpkg
# rpm's rpm, rpm2cpio (Slackware has an 'rpm' package)
# cpio
# infozip's unzip
# cabextract
# mtools' mdir, mtype, mtoolstest
# dvi2tty
# groff
# Perl's pod2text
# pstotext
# ghostscript's gs, ps2ascii
# binutils' nm
# html2text
# lynx
# xpdf's pdftotext
# antiword
# unrtf
# cdrtools' isoinfo
# mp3info

# This will set it up with support for utils that are installed on your
# system.  To include support for everything (if you're planning on
# installing all of those utils later), pass --yes to configure instead of
# --default.  To be prompted for everything individually, just run configure
# by itself.

cd
test -f installed/lesspipe-1.53.tar.gz && mv installed/lesspipe-1.53.tar.gz .
test ! -f lesspipe-1.53.tar.gz &&
wget http://www-zeuthen.desy.de/~friebel/unix/less/lesspipe-1.53.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "lesspipe-*" -exec rm -r {} \;
tar xzvf ~/lesspipe-1.53.tar.gz
cd lesspipe-1.53
test $UID = 0 && chown -R root:root .
chmod -R u+w .
./configure --default

# Become root to install it
su

install -m 0755 lesspipe.sh code2color /usr/bin/
chown -R $USER .

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/lesspipe-*.tar.*
mv lesspipe-1.53.tar.gz installed/

# To activate lesspipe.sh (if you use bash), run this:
export LESSOPEN="|lesspipe.sh %s"

# To activate it on boot-up from now on, add that line to your /etc/profile
# (It's probably already in there), or create a /etc/profile.d/lesspipe.sh
# with that line in it.


# If you ever want to uninstall less, this should do it:
cd
su
test -d src/less-* && ( cd src/less-* ; make uninstall )
( cd /usr/bin ; rm -f less lessecho lesskey )
( cd /usr/man/man1 ; rm -f less.1 lessecho.1 lesskey.1 )
exit
find ~/src -maxdepth 1 -type d -name "less-*" -exec rm -r {} \;
rm -f ~/installed/less-*.tar.*

# If you ever want to uninstall lesspipe, this should do it:
cd
su
test -d src/lesspipe-* && ( cd src/lesspipe-* ; make uninstall )
( cd /usr/local/bin ; rm -f code2color lesspipe.sh )
rm -f /usr/local/man/man1
exit
find ~/src -maxdepth 1 -type d -name "lesspipe-*" -exec rm -r {} \;
rm -f ~/installed/lesspipe-*.tar.*

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EST -0500)
HOWTO last updated: 2007-09-11 10:25am
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]