Disclaimer ========== All Materials: Copyright 1997-1999, IBM Corporation & Tivoli Systems All rights reserved Distribute freely, except: don't remove my name from the source or documentation (don't take credit for my work), mark your changes (don't get me blamed for your possible bugs), don't alter or remove this notice. No fee may be charged if you distribute the package (except for such things as the price of a disk or tape, postage, etc.). No warranty of any kind, express or implied, is included with this software; use at your own risk, responsibility for damages (if any) to anyone resulting from the use of this software rests entirely with the user. Send me bug reports, bug fixes, enhancements, requests, flames, etc. I can be reached as follows: John Pfuntner jpfuntne@us.ibm.com Introduction ============ Welcome to Bruno's Bag of Tools (BBoT). I'm your host, "Bruno" (aka John). This package contains many small tools I've found useful on OpenEdition MVS (OS/390) and wanted to share with other people. Most are not very fancy and I don't expect anyone to use every single one of them. Perhaps they will inspire you to write similar tools or your own tools! Changes ======= April 98: I added a new option to dosfix to cause it to avoid doing ascii/ebcdic translation, which is useful if you've already converted the data yourself. May 99: Added a new tool: newname. July 99: Added the -u option to the newname tool - I had a need for such an option yesterday and decided to incorporate it in this tool and distribute the change. July 99: I changed the instructions for copying all the executables into another directory to avoid strange messages when you try to copy a directory. August 99: Added bingrep. Descriptions ============ Below is a brief description of each tool. Please refer to the man page (help file) for each tool to get more information. For instance, the manpage for a2e is a2e.1. Name Language Portable? Description a2e ksh yes, Converts ASCII data to/from EBCDIC. with right Can be used as a filter or to codesets update files in-place. bingrep C yes Search a binary file for a character string. cap ksh yes Display filesystem capacity. clear ksh yes Clears the screen (raw mode or 3270) dosfix C yes "Fixes" data problems found in dos files: carriage returns prior to every newline, EOF character. errnos C with a Display information about errno little work values. filetype C yes Determine whether a file is text or binary, can be used to filter out only files of a specific type. flow C yes Causes lines to be reformated to join lines and conserve space (ala ls output). lengthen C yes The opposite of "shorten" (see below). A filter to remove shell/C continuation characters, joining lines together. lexec C yes A program to show all occurrences of a filename pattern in your PATH variable. logshell C yes - A tool to save all I/O from a ok for shell session. A little too crude AIX to be fool-proof but useful in many circumstances. lowernames ksh yes rename files with uppercase case characters in their names to all lowercase lresolve C yes Print the "true" names of files, following symbolic links, discarding links that are not backed by true names. mvsget C no Copy a C source file from an MVS PDS into the HFS with the ".c" suffix. newname ksh yes Rename files according to a sed substitute expression. origit ksh yes Backup a file in preparation for making changes to it. Useful in porting. pathperm ksh yes Display the permissions of a pathname plus every parent directory, all the way to the root. qc C/ksh yes Compile & execute a small C fragment (typically, a statement or two) "on the fly" in a temporary file. rmon C no Display OpenEdition MVS resource information shorten C yes The opposite of "lengthen" (see above). A filter to insert shell/C continuation characters, spliting lines so that they'll fit within columns 1-72. timestamps C yes Display timestamps of files. trim C yes Remove trailing blanks in text files. undupe C yes Remove formating characters that often make text files difficult to read such as backspaces when used for emphasis (overstrike) or underscoring. unprintable C yes Print information about unprintable characters in a file. users rexx no Display the number of shell users logged on. Installation instructions ========================= I didn't include a makefile but all of the C code is pretty much stand-alone. The built-in make rules should be enough for a simple make on the load module name to compile and link the program. If you want to compile them all, try the following in the shell: for fn in *.c; do; make ${fn%.c}; done The scripts and execs already have the execute bits on so if you want to copy all the executable files into a public directory, try: bbot=$(find . -type f -perm -100) chmod +rx $bbot cp $bbot /usr/bin Of course, this assumes: 1) /usr/bin exists 2) it has at least permission 755, allowing everyone to execute from it 3) you have write permission to it 4) /usr/bin is in the PATH variable of anyone who wants to use these tools: each user could be responsible for adding it or maybe you might want to do it in /etc/profile. It would be nice to make the man pages available too. You might consider doing: mkdir -p /usr/doc/cat1 cp *.1 /usr/doc/cat1 and putting the following in /etc/profile or have individual users do it in their $HOME/.profile themselves: export MANPATH='/usr/man/%L:/usr/doc' Contacting me ============= Send me email at jpfuntne@us.ibm.com. I respond to all email (well, everything that requires a response), personally and quickly (I hope).