Differences between revisions 1 and 2
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
To create a text file, you can use any one of the many text editor choices that exist: emacs, gedit, pico, vi, etc.
Line 23: Line 22:
For the purposes of this tutorial, we will show you how to use emacs however gedit works similarly. In a terminal window, you would type the command {{{emacs}}} followed by the name you would like to call the text file:

To create a text file, you can use any one of the many text editor choices that exist: emacs, gedit, pico, vi, etc.

For the purposes of this tutorial, we will show you how to use emacs however gedit works similarly. In a terminal window, you would type the command emacs followed by the name you would like to call the text file:

emacs file.txt

The extension of the file (i.e. .txt in this example), should be whatever is appropriate for your purpose in creating this file. Some examples:

  • If you wanted to create an FSGD file, the extension should be .fsgd
    If you wanted to create a contrast matrix, you might use the extension .mtx
    You might use .dat for a design or registration matrix
    To keep a record of the output of a command, you might use .log
    If you are creating a script, you would end it with the extension appropriate for the type of script it is:

    • .csh for a cshell script

    • .m for a matlab script

    • .sh for a bash script

Or you might not use an extension at all. It's not always necessary but can be useful to keep track of the purpose of a file.

After entering the command above, the text editor should open. It will be completely blank since you are creating a new text file. Type the information you needed to enter in a text file and then choose File > Save (buffer) to save your changes. You can close the text editor when you are done. If you'd like to view it again or make additional changes, you would open it again the same way as above:

emacs file.txt

FsTutorial/CreatingTextfiles (last edited 2016-03-31 19:35:02 by LeeTirrell)