On Thu, 2002-04-04 at 17:15, Anthony V Guillen wrote:
> Thanks to all who sent their response to my question. I have another question, I 
>think this is a ridiculous question, but I have nothing to do but to ask this 
>question just to know, I know that if we compile a program like an assembly program, 
>it will make another file excluding the source code, its either an .exe file or a 
>.com file, depending on the structure of the program, or in c programming, when we 
>compile a program, I know that it will make an exe file.  If it so, why is it that 
>most of the files in Linux has no extension name, particularly no executable file 
>like in windows e.g. (scandisk.exe)?
> 
> 
OK

Simple, really, file extensions are there for typing files, and there
are other ways to do that in linux/UNIX.  In particular, an _executable_
bit is available in file permissions...  well actually three such bits,
one for owner, one for members of owner's group, and one for the rest of
the universe.  

Open a terminal window.

cd /usr/bin
ls l*

and you will see a list of files.  Those shown in green with an asterisk
following their name are executable.

Executable files are NOT NECESSARILY files which have been compiled to
dynamically linked (like exe) or statically linked (like com) files... 
.bat files are included as well, and something like this will be on the
first line

#!/bin/sh

for shell programs

#!/usr/bin/perl

for perl programs

#!/usr/bin/env python

for python programs--all of those call script interpreters and then run
the script in the file.  Xtart is an example of a python program,
located at /usr/bin/Xtart which executes fast enough that it is unlikely
ever to be recoded into C.

For a real treat, look at

man bash

The shell which executes batch files can do stunningly powerful
things...  Look also at /etc/rc.sysinit for examples of the sort of
analysis programmable.

printerdrake is an example of an extremely powerful perl program

Civileme




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to