Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I know that there is an editor built into MS-DOS, so you can create batch (.bat) files. But is there something like that for Linux Mint 12 terminal?

share|improve this question
1  
FYI, there is no editor built-in to MS-DOS, but most installations include EDIT.COM to do basic editing. –  StarNamer Aug 10 '12 at 22:27
add comment

migrated from stackoverflow.com Aug 10 '12 at 5:16

This question came from our site for professional and enthusiast programmers.

1 Answer

For editing/creating files from shell:

Most linux distros come with nano which is quite friendly.

Another alternative would be vi, but that's a little more complicated.

For a '.bat' equivalent for sequencing commands:

Depending on the shell you are using (most likely bash) you will need to write shell script, traditionally with a .sh extension (or with no extension, using a hashbang). The syntax depends on the shell that is interpreting the script. If you are using bash, then you should investigate bash scripting. Examples of other shells include zsh, csh, pash, and Ipython shell; but bash is the most common by far.

Note that shell scripts require execution permissions to run. You would set these using chmod (e.g. chmod u+x <filename>)

share|improve this answer
    
Mint is based on Ubuntu, which ships with nano by default, so I think it's already installed. –  Blender Aug 10 '12 at 3:57
    
so I can put in commands to be executed later? and if so what file extension should i give them? –  Ikechi Anyanwu Aug 10 '12 at 4:04
    
@IkechiAnyanwu Ah you are actually asking a slightly different question. I will update in a minute. –  Preet Kukreti Aug 10 '12 at 4:05
1  
@AndyRoss yes, however I didnt mention it since while it is arguably the most available, it is also not as newbie friendly as nano is. And if one goes down the modal editor route, then they might as well go for a vi variant... –  Preet Kukreti Aug 10 '12 at 5:09
1  
It was a joke. For years and years, long after it was obsolete, the man page for "ed" began with "ed is the standard editor". See: c2.com/cgi/wiki?EdIsTheStandardTextEditor –  Andy Ross Aug 10 '12 at 5:13
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.