[Home] [Readings] [Photography] [GuestBook] [Contact Me] [Send Feedback]

Unix scripts that you may find useful

Disclaimer and Terms: You may use these scripts for commercial or non-commercial use at your own risk, as long as you retain the copyright statements in the source code. These scripts are provided "AS IS" with no warranty whatsoever and are FREE for as long as you want to use them. You can edit and adapt them to your requirements without seeking permission from me. I only ask that you retain the credits where they are due.

  1. eXtract Source Code Comment (xscc.awk) is an awk script that extracts code or comments (or copyright statements) from a source file. It supports several programming languages, including Java/idl/C/C++/awk/Perl/bash/sh/ksh/html etc. Read more ...
  2. Source Lines of Code and Comment Count (slocc.sh) is a shell script that uses sh, sed and awk to produce lines of code and comment count for software source code. It supports various options including: Download ...

  3. Unfold LDIF (LDAP Data Interchange Format) lines (unldif.sed) is a SED script that resulted from a need to process an ldif file via a shell script. Programs that output LDIF files fold a long field on multiple lines by inserting a line separator (either a linefeed or carriage return/linefeed pair) followed by a space. Processing such ldif files through another script becomes much easier if such lines were unfolded. That is exactly what this script does. It unfolds ldif entries that are folded (broken) across lines and writes them on a single line. Since most LDIF parsers accept unfolded lines, you do not have to fold it back. To fold them back (if you need to), see next item. Download ...
  4. Fold lines as per RFC2425 (fold.awk) is an AWK (use nawk on Solaris) script that implements line delimiting and folding as described in Section 5.8.1 "Line delimiting and folding" RFC2425. It can be used to fold MIME content at any given line width (defaults to 75 characters per line), and can be used to re-fold LDIF files after processing. Download ...
  5. text2html (text2html.awk) is an AWK script that converts a text file to html so that the text can be included in an html page. In particular, it converts special HTML characters so that they can be displayed verbatim. This script does not support syntax highlighting (unlike java2html or cpp2html programs), as it is intended for arbitrary text files, but it does support a few useful options as described in the usage of the program. Read more ...


This page has been visited  times.

[Home] [Readings] [Photography] [GuestBook] [Contact Me] [Send Feedback]