fstools - Frams' Shell Tools

All programs are GPL open source freeware.

abspathshow absolute path of a file
addcradd CR (ASCII 13) to end of line (LF → CRLF)
example: addcr fordos.txt
delcrdelete CR (ASCII 13) at end of line (CRLF → LF)
example: delcr forunix.txt
delumlautconvert Umlauts to Duden vocale-transcription
example: delumlaut *.txt
bconvertconversion between binary, octal, decimal, hex and ASCII values
example: h2d 7FEA A0
aw2remail-filter to convert irregular AW-subjects to RFC-conform RE-subjects.
example: cat mail | aw2re
calcsimple CLI calculator
example: calc 4*1024+512
catzgzip-aware cat: concatinates normal and compressed files to STDOUT
example: catz syslog* > syslog_complete
cdb / cdbmcd with bookmarks
clpcommand line perl: "Perl shell" for one-line scripting, testing and development
colsumsum up columns
example: ls -l | colsum -v 5
countcount numbers or characters from..to (up or down)
example: for i in $(count 1 20); do echo $i; done
cpapcopy with append-continue if destination exists (does seek)
example: cpap bigmovie.avi /nfs/storage/bigmovie.avi
d3d3 decimal numbers format filter
example: df . | d3
df3better df with d3 decimal numbers format
dirlistunsorted list of files (original inode sequence)
example: dirlist /etc
divxencodeconvert files of nearly any video format into DIVX in AVI container
example: divxencode youtube.flv
dnsdomainnameprint the DNS domain name
domainsortsort lines with domain names or e-mail addresses for domain names
epochprint UNIX epoch seconds or convert ISO date-string to epoch
example: epoch 2008-10-15 18:04:52
exargsread argument lines from STDIN (pipe) and execute program with it (extended xargs)
example: ls x* | exargs xmessage %a
extractextract lines from..to line number
example: extract 5-11 /etc/passwd
fexsendCLI F*EX client for sending files
example: fexsend vmware.tar framstag@rus.uni-stuttgart.de
fexgetCLI F*EX client for receiving files
example: fexget -l; fexget 3
sexsend, sexget(*)CLI S*EX clients
example: tailf mail.log | sexsend -t framstag@rus.uni-stuttgart.de
findsamefind files with identical content
example: findsame /etc
fpgFrams' Perl grep: grep with Perl regular expressions, highlight output, paragraph mode, mbox, binary and gzip support
example: fpg '\d+ BLOCKED' syslog*.gz
fs, fs3(*)file sizes: a "best of" du, wc and d3
example: fs -3 /usr/src
fstatFrams' stat: print file status information
example: fstat -file -inode *
gdbm_dumpdump content of gdbm file
example: gdbm_dump mailman.db
hdinfoprint informations about disk drive or partition (needs lf and lshd)
hexdumphex and ASCII dump
example: hexdump /etc/issue
hmsumsum of date in hour:minute format
example: hmsum 2:15 11:50 0:13
hostlookupshow host ip address with respect of /etc/nsswitch.conf
example: hostlookup www
howmanycount regexp matches per line
example: echo $PATH | howmany :
ipsortsort lines with ip as sorting criteria
example: route -n | ipsort
jpg2psconvert JPEG to Postscript
example: jpg2ps map.jpg
jpgreducereduce JPEG file size (same resolution, lower quality)
example: jpgreduce big*.jpg
jpgrotrotate loseless JPEG files
example: jpgrot -n *.jpg
jpgscalescale down JPEG files
example: jpgscale -800 *.jpg
l, ll, lll, lf(*)better ls: more consistent output, better configuration, more options
example: l -R
lanscansearch subnet for hosts
lshdlist hard disks and partitions
mail2htmlconvert mail (or any other text) to HTML and displays it with firefox
example: cat mail | mail2html
modmailmodify e-mail headers and/or body
(a filter extension for procmail/formail)
mmencode, mmdecode(*)encode and decode MIME base64 and quoted-printable
example: mmencode -b vt100_sequences.txt
utf7decodedecode UTF7 to ISO-Latin-1
example: utf7decode utf7.html > latin1.html
utf7encodeencode UTF7 from ISO-Latin-1
example: utf7encode latin1.html > utf7.html
utf8decodedecode UTF8 to ISO-Latin-1
example: utf8decode utf8.html > latin1.html
utf8encodeencode UTF8 from ISO-Latin-1
example: utf8encode latin1.html > utf8.html
mxvextract attachments out of mail-stream and display it with firefox
example: cat mail | mxv
notinprint lines which are not in exclude_file
example: notin exclude.list *.txt
nvtnetwork virtual terminal: RFC-conform command line tcp connect, a better telnet for scripting
example: nvt fex.rus.uni-stuttgart.de:80 'GET / HTTP/1.0' ''
openpathset read+execute permission on all parent directories
example: openpath .
pawkawk-like scripting with Perl syntax
example: ls -la /tmp | pawk '/2010/{$s+=$_5}END{print $s}'
pededit files via perl command(s) in place
example: ped 's/ /_/g' *.txt
perlmodhistshow release date for a Perl module
example: perlmodhist Digest::MD5
plgprocmail log grep: better procmail log format and grepping
example: plg root@fex
portwatchopen tcp port in server mode and wait for client to connect
example: portwatch -v 8888
psdoexecute program if a process is found which matches pattern
example: psdo inetd xmessage 'inetd is running'
psgps (process status) with grep
example: psg ssh.*fex
pskps (process status) with grep and kill
example: psk firefox
renamerename files with regexp-syntax
example: rename '.tar.gz/.tgz' *tar.gz
repeatrepeat command with curses-interface
example: repeat ll download
reversereverse lines or words
example: cal | reverse
sdrsimple date reminder (daemon+client)
searchsearch programs in $PATH by given substring
example: search pdf
selselect files from current working directory from..to
example: xv $(sel p20080815 - p20080819)
shuffleshuffle arguments and optionally run program
example: shuffle -e xv *jpg
smtpsendsmtpsend injects a RFC822 e-mail into a smtp server
example: smtpsend -s mailrelay framstag@rus.uni-stuttgart.de <mail.txt
ljoinjoin lines with delimiter (inverse of ssplit)
example: cal | ljoin -d :
ssplitsplit strings at delimiter into lines (inverse of ljoin)
example: echo $PATH | ssplit -d :
sshessh with environment variables passing (default SSH_USER EDITOR LANG LC_*)
example: sshe otheruser@nexthost
tailftail -f with much less memory consumption and recognition of inode change (e.g. log rotation)
example: tailf /var/log/mail.log
tailpPrint the last lines of file beginning with pattern to standard output.
example: tailp fex.*.uni-stuttgart.de /var/log/mail.log
tcpbmtcp benchmark : measure sending and receiving speed between two hosts
tscpscp with tar : copy files to or from remote host in tar format
example: tscp src blubb:/tmp/
truncatetruncate file
example: truncate 1M test.mp3
urldecode, urlencode(*)RFC 2396 escaped encoding of URLs
example: echo 'http://localhost/testcgi?space=x y' | urlencode
vvmanipulate file versions
wgetdldownload (with resuming) and use filename suggested by server
example: wgetdl http://www.flupp.org/video?kjdhkjkj473kj35 # ==> jump.avi
witheasy command loop for files
example: with *.jpg : jpegtran -rotate 90 %f
wwterminal based interactive file selection
example: ww *.jpg
woosweb offer one stream
example: tar cvf - /opt | woos
zzgeneric CLI clip board
example: locate mp3 | zz
ezzedit the generic CLI clip board
xxinternet-wide CLI clip board for files and STDIN/STDOUT
example: xx *jpg
xzzX selection (mouse buffer text) clip board history
bashrcsome usefull bash aliases and functions
spamblockprocmail based spam filter

(*) You have to create symlinks to obtain the other programs

To install all programs in one go:
wget -O- http://fex.rus.uni-stuttgart.de/sw/share/fstools-0.0.tar | tar xvf -

Other Linux tools

spreadssh based UNIX mass administration
usbmountmounts any USB mass storage partitions
sperlrun perl scripts SUID root
lxcmeta-tool for Ubuntu based Linux Containers

Author: Ulli Horlacher