Good afternoon
Do Mär 21 13:34:19 2013
Thank You for help.
> What is bat com exe in Linux?
These are just extensions to the filename that in Windows are used to
determine the type of file, under Linux there is no real connection
between what you name a file and what type of file it is, or how you can
use it.
*
I know
I can name a jpg file to a.txt and I can open it with gimp as jpg.
I try to describe the problem.
For example:
I am creating with a compiler a executable program.
How does it look?
a bat file is a plain text file containing msdos type commands as you
might type into a command shell.
*
Yes.
Is it called doit.SH
?
In Linux these are called shell scripts
and generaly start with a special line called the hash bang which looks
something like-----
#!/bin/bash
*
Thank You.
the symbols #! are special and tell the system to use the following
program to run the file '/bin/bash' is one of many programs you can use
and is the program you use as a command shell.
*
Thank You.
Conventionally people do add 'sh' to these files but anything is fine,
.shell, .bash, .csh, .ksh are also used. You will also see programs for
some languages using this perl, python, ruby and awk
*
Thank You.
a com is a command file and works in much the same way
An exe is an executable program, under linux any file can be marked as
executable (including shell scripts), every file has a set of
'permissions' attached to it, you can see them by typing ls -al at a
command prompt, one is called the execute permission or 'x'. you can set
it by typing chmod +x filename. this will make any file executable.
*
This I did not understand.
Example:
I am creating in DOS a programe in Pascal.
I call it doit.pas.
Then I compile it and there is a file calles doit.exe.
Now I call doit.exe and it is running.
when you try to run a program (a file with it's execute permission bit
set) the shell looks at it to deternmine what type of file it is, if it
is text and contains a #! it passes the file to the named program,
otherwise if it is a binary file (a program) it loads and ececutes it.
*
Thank You
Regards
Sophie
------------------------------------
To unsubscribe from this list, please email LINUX_Newbies-unsubscribe@yahoogroups.com & you will be removed.Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/LINUX_Newbies/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/LINUX_Newbies/join
(Yahoo! ID required)
<*> To change settings via email:
LINUX_Newbies-digest@yahoogroups.com
LINUX_Newbies-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
LINUX_Newbies-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment