Linux HOWTOs

About | Home | Search


HOWTO: textutils
Description: GNU text file processing utilities
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# fileutils, sh-utils, and textutils have all been combined into coreutils.
# Unless you specifically need to use the individual old packages, you should
# move to coreutils instead of installing/upgrading textutils.

# I haven't used textutils in a long time, if you find anything broken in
# here, let me know (e-mail link is at the bottom).


# GNU textutils 2.1
# =================
# Prerequisites:
# gawk
# perl
# grep
# libiconv
# shadow
# gettext

cd
test -f installed/textutils-2.1.tar.bz2 &&
 mv installed/textutils-2.1.tar.bz2 .
test ! -f textutils-2.1.tar.bz2 &&
 wget http://ftp.gnu.org/gnu/textutils/textutils-2.1.tar.bz2

# Verify tarball w/ md5sum:
echo "47455186d12b65d363adc80e900f8682  textutils-2.1.tar.bz2" | md5sum -c

# Verify tarball w/ sha1sum:
echo "a51c96af2ff9e06650c10fa7655a13edb053467e  textutils-2.1.tar.bz2" | \
 sha1sum -c

# Verify tarball w/ gpg:
( gpg --list-keys D333CBA1 > /dev/null 2>&1 || gpg --recv-keys D333CBA1 ) &&
 wget -nc http://ftp.gnu.org/gnu/textutils/textutils-2.1.tar.bz2.sig &&
 gpg --verify textutils-2.1.tar.bz2.sig && rm textutils-2.1.tar.bz2.sig

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "textutils-*" -exec rm -r {} \;
tar xjvf ~/textutils-2.1.tar.bz2
cd textutils-2.1
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr --disable-nls
make

# Become root to install it
su
removepkg txtutils textutils
find /usr/share/locale -name textutils.mo -exec rm {} \;
make install-strip
ln -sf /usr/bin/cat /bin/cat
ln -sf /usr/bin/cut /bin/cut
ln -sf /usr/bin/head /bin/head

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/textutils-*.tar.*
mv textutils-2.1.tar.bz2 installed/

Back to the list


Last updated: Wed, 29 Apr 2020 22:04:50 -0400
Jason Englander <jason at englanders dot us>