Text Editors

From HPC

Jump to: navigation, search

Contents

Command line/script

These are tools that allow you to create/modify text files via the command line or in scripts.

Touch

Creates empty files ready for writing to

touch myfile.txt

Cat

Reads files and dumps them to the console, you can redirect to a file via >

//read single file
cat myfile
//read multiple files (myfiles1, myfiles2, myfiles3//0
cat myfiles*
//read multiple files and dump in a file
cat myfiles* > combined.txt
//append one file to another
cat file1 >> file2

Grep

Provides serach/filter operations on input (case sensitive) use regular expression. See "man grep" for more details

//read file, search for lines containing the word debug 
cat mylog | grep debug
//read file, search for "results returned" and output to new file
cat mywork.txt | grep results\ returned > myresults.txt

Console Editor

This editors are available when you are via the ssh terminal/putty

VI

This editor is not for the faint hearted

vi cheat sheet http://www.lagmonster.org/docs/vi.html

Nano

Good command line editor (similar to pico)

Pico

Good command line editor (Similar to nano)

GUI

These editors are gui based and will need a remote X session.

Personal tools