Programming Question

Asked by Christopher

I have been programming on windows, and recently moved to ubuntu. Can someone tell me what is equal to a windows .exe extension?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
sohail (launchpad-taggedtype) said :
#1

The sort answer is that files can be made executable (i.e. the OS will load and execute the file) if the executable bit is set. You can do this for a given file by typing `chmod +x /path/to/my/file`.

If you are programming C/C++, the executable format will most likely be ELF which is a standard for object code layout (I think it stands for executable linking format or something).

A lot more fun is knowing how linux will execute text files. If you write a text file as follows (^D means press CTRL-D, $ is your command line prompt):

$ cat > myfile.sh
#!/bin/bash

echo "Hello world"
^D
$ chmod +x myfile.sh
$ ./myfile.sh
Hello world

Bash scripting is generally useful and is a sorely lacking feature in Windows. Indeed every Windows computer I have at work has all the unix tools installed on it.

I hope that helps!

Sohail

Revision history for this message
Matt Thompson (mattthompson) said :
#2

Then theres always python is you want to do something slightly more powerful than shell scripting without the complexity of a language such as C or C++.

Check out 'Dive Into Python' in the pre-installed Ubuntu docs to see more about it.

Can you help with this problem?

Provide an answer of your own, or ask Christopher for more information if necessary.

To post a message you must log in.