having an executable behave like a file

having an executable behave like a file

Post by Gerhard den Holland » Wed, 30 Dec 1992 19:29:47

Hi I have the following problem:

I have a program which reads a file in
(use it as a help test)
while testing this program,
I want the helpfile to be different everytime I use it.
So what I want is some random text generating program (like fortune)
which could be addressed as a file


Please send me private email


1. Executable Binary File vs. Executable Script File


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

        for ff in `find . -type f`
                ! test -r $ff || strip $ff

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.

2. Problem with Serial port if X is running

3. DHCP server doesn't behave as should behave.

4. Linux-Help Digest #865

5. How to input file to a executable file use csh?

6. Keeping a System Incident or Log file

7. How to link object files from gcc and absoft f90 into a executable file?

8. Kerberos vversion 4

9. executable object code file vs script file

10. gdb: core file not in executable format: File format not recognized

11. executable files w/o using 'file'

12. Request on how to get source file from executable file

13. executable files w/o using 'file'