Perdenab

perdenab yahoo co uk




Shell Tools Page

Utilities for the Unix Shell environment

tzls  tzx  fff  ffl 
brip  bd  nss
Portable .profile .kshrc .bashrc

Perdenab is a unix/network admin, developer and CISSP.  Harnessing the power of the Unix shell environment one of his many interests.

Some of the places where perdenab can be found are:
 
irc://irc.freenode.net/solaris
irc://irc.freenode.net/security
irc://irc.freenode.net/crypto
irc://irc.freenode.net/selinux
irc://irc.freenode.net/adamantix
irc://irc.freenode.net/web
irc://irc.freenode.net/writing
irc://irc.freenode.net/politics

If you subscribe to only one IT mailing list, then perdenab suggests:

http://www.risks.org


tzls and tzx
click to view/download

Quick extraction and content-listing for the following archive and compression types:
tar
bzip2 (bz2)
cpio
gnu zip (gz)
zip, rar, arj
compress (Z)
Usage:
tzls [ -v ] filename  list contents
tzx [ -v ] filename unpack into current directory
 
fff and ffl
click to view/download

Quick, case-insensitive file-find with unquoted wildcards.  Options to find(1) can be appended if desired.

Usage:

fff *some*pattern* [ *some*pattern* .. ] [ -{find-options} ]
find matching files/directories etc that match *some*pattern*, displaying the full path, one match per line

ffl *some*pattern* [ *some*pattern* .. ] [ -{find-options} ]
same as above, but displaying relative paths


For an fff command at a WinNT/XP/Win2K DOS/CMD prompt, run the following command to create an fff "alias".  Sorry, no ffl capability or find(1) options.
doskey fff=dir/s/b/on $*



brip
click to view/download

Bulk / stream Resolution of IP addresses and hostnames
  • Resolve IP addresses and/or hostnames in bulk
  • Can read from STDIN, commandline or file
  • Can be used for quick commandline lookups, like host, dig and nslookup
  • Automatically detects which of the three is on your system, and uses whichever is available, in that order of preference
Usage:  brip [ options ] [ { hostname | ipaddress } ]

Detailed information regarding options can be viewed within
brip itself
bd
click to view/download

Backup with Date appended.  Copy the specified file(s) to the same name, but with a textual date/time appended down to the current second.  The filesystem date/time stamp for the original file is preserved.

Usage:  bd file [ file .. ]

Example:  bd foo.txt   results in   foo.txt.2004-02-11-202410

nss
click to view/download

New (Bourne) Shell Script.  Creates a skeletal shell script containing:
  • Error-handling functions
  • Signal handling (trap settings)
  • Customisable commandline parsing
  • A comment-block at the top, reminding the programmer of various bits of useful documentary info that are nice to have in the script

Usage:  nss scriptname

Portable .profile and .kshrc files, usable with ksh/bash, under Unix, Cygwin or MKS
click to view/download

Usage:
  1. Save the .profile and .kshrc files into your home directory (after backing up the ones you have, if any)  Also install this stub .bashrc.
  2. ln -s .bashrc .bash_profile
  3. Log in using bash or ksh



1