Hi,
I need to write a simple script to "strip off" all the binary files in a
certain directory that contains some sort of executable script files,
i.e. perl, shell, tcl, etc. I tried the following script that I named
"/tmp/junk":
#!/bin/sh
for ff in `find . -type f`
do
! test -r $ff || strip $ff
done
and it did stripped off the executable binary files as well as giving me
some error messages saying "File format not recognized" when it tried to
strip off the script files. The question is: How to modify the above
script that will by pass the stripping process if the file is not really
an executable binary file?
Can anyone please help? TIA.
--
PS> Remove the "4" from e-mail address to respond.