Added "what" script. Moved miscellaneous tools (sizeofchk, what)

into their own "misc-tools" sub-directory and updated README.md to
reflect the change.
This commit is contained in:
Ed Braaten 2015-05-17 08:55:00 -07:00
parent b0196162a9
commit 787c1866e2
5 changed files with 15 additions and 2 deletions

View file

@ -1,5 +1,6 @@
# src-ed
Source code samples for various languages - hello name-your-language world!
Source code samples for various languages - hello "name-your-language" world!
The subdirectory "misc-tools" contains miscellaneous utilities that may
be of interest or help to a programmer.

12
misc-tools/what Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
#
# what - get SCCS identification information
#
# SCCS was the source code control system distributed
# with AT&T Unix System III and V.
#
for i in "$@";
do
echo "$i:"
strings "$i" | grep -e '@(#)' | sed 's/^.*[@][(][#][)]\(.*\)/ \1/'
done