I'm often uncertain, whether a program is a script, or a binary.
And where is it installed?
So I wrote a script, which looks
which command would be used (/usr/bin/foo /usr/local/bin/foo ?)
what kind of file it is (script, elf-binary?)
and if it is a script, it is printed to stdout.
Since I made it (and made some improvements) I'm using it quiete often, so perhaps it's useful for others too:
It's GPL:
Don't miss the final empty lineCode:#/bin/bash # (c) 2003 bashguru Stefan Wagner, Berlin Schöneberg, license: GPL # For a programm: # find where it is (especially if there is more than one): # <which> # what kind of hack is this (elf-binary, bash-script?): # <file> # if it is a script, print it: # <cat> if [[ $# -ne 1 ]]; then echo "Usage: whatmakes.sh THIS" exit fi PROG=$1 LOCATION=$(which $PROG) # not needed, 'file' shows it as well: echo $LOCATION file $LOCATION ART=$(file $LOCATION | grep -c text) if [[ ART -eq 1 ]]; then cat $LOCATION fi
Put it into ~/bin or /usr/local/bin to have it easy accessible in your path.
Feedback is welcome.
manpage and option --help should be made... I know...

Vintage DEC RT-11 V5.0 8� Floppy Disks HT-11 System BASIC FORTRAN Software Lot
$199.95
🔥 Vintage HP 21MX 1000 M-Series Minicomputer Chassis Backplane Parts AS-IS �
$309.00
Vintage BMC CRT Data Display BM-12AUW Monitor Commodore 64 - Power Tested Only
$199.99
Vintage computer AMD K6-2 300 MHz 96 MB ram No HDD/No OS
$79.99
Vintage HP 04953 CRT 1 Controller Card PCB, Circuit Board, Module
$30.00
Vintage ET4000AX ISA VGA Graphic Card 1MB WORKING
$69.12
Vintage HP 04953 ETC Controller Card PCB, Circuit Board, Module
$30.00
Vintage HP 04953 Processor Controller Card PCB, Circuit Board, Module
$30.00
Vintage Intel iPDS-100 Personal Development System
$1499.99
Vintage Dell Dimension L667R Pentium III 384 MB Ram No hard drive or o.s.
$99.99