how can I create a macro file ?

Asked by one on 2012-06-03

I wanna create a macro file in terminal , How can i do that ?

Question information

English Edit question
Ubuntu gnome-terminal Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:

What is the macro to do?

one (boboahmed25) said : #2

I need it to help me to write some commands in it fora simulation program on my unbuntu

ubuntu, not unbuntu.

What will the commands do exactly?

one (boboahmed25) said : #4

I just want to create a file type of a macro

That doesn't make any sense. You can make bash scripts to do macro-like things. Is that what you mean?

one (boboahmed25) said : #6

what i meant that i have a simulation program and I found that this program needs to build up macros files containing an ordered collection of commands. I know how to write commands in it ,but i wanna know exactly wt is command which makes me enable to create a macro file in the terminal to open it and then write in it my commands

Wyatt Smith (wyatt-smith) said : #7

How about a simple bash shell script. It is just a basic text file that will execute in a terminal shell.

The initial line of the script is the sha-bang! which specifies what command shell to use. I suggest using bash, the default command shell in ubuntu. A simple bash script would look like this

exit 0

Typically the script should be named with the .sh extension (for example After you save the file, you will need to make executable or it will not run.

Hope this helps

Best codemaniac (arijit.dutta) said : #8

Macro is used in windows applications in order to automate repetitive tasks .
In linux there is shell script for you to do the jib .
Place all your commands and instructions in the shell script and execute .
Have some goggling on the topic .

one (boboahmed25) said : #9

Thanks Arijit Dutta, that solved my question.

one (boboahmed25) said : #10

Thanks a lot Wyatt Smith for u , ur answer helped me so much .

codemaniac (arijit.dutta) said : #11

good to hear that .

search for abs guide , that contains a wealth of information on bash scripting .