-x --- where x is a number, to cut from line 1 to "x"
x- --- where x is a number, to cut from "x" to the end.
cut -5, 20-, 8 file2.txt
This would display ("cut") characters (columns) 1 to 5, 8 and from 20 to the end.
- ispell/aspell
- chcase
- fmt
- paste
- expand
- ignored)
To spell check a file interactively, prompts for you to replace word or continue. aspell is said to be better at suggesting replacement words, but its probably best to find out for yourself.
aspell example:
aspell -c FILE.txt
This will run aspell on a particular file called "FILE.txt", aspell will run interactively and prompt for user input.
ispell example:
ispell FILE.txt
This will run ispell on a particular file called "FILE.txt" ispell will run interactively and prompt for user input.
Is used to change the uppercase letters in a file name to lowercase (or vice versa).
You could also use tr to do the same thing...
cat fileName.txt | tr '[A-Z]' '[a-z]' > newFileName.txt
The above would convert uppercase to lowercase using the the file "fileName.txt" as input and outputting the results to "newFileName.txt".
cat fileName.txt | tr '[a-z]' '[A-Z]' > newFileName.txt
The above would convert lowercase to uppercase using the the file "fileName.txt" as input and outputting the results to "newFileName.txt".
chcase (a perl script) can be found at the chcase homepage.
(format) a simple text formatter. Use fmt with the -u option to output text with "uniform spacing", where the space between words is reduced to one space character and the space between sentences is reduced to two space characters.
Example:
fmt -u myessay.txt
Will make sure the amount of space between sentences is two spaces and the amount of space between words is one space.
Puts lines from two files together, either lines of each file side by side (normally separated by a tab-stop but you can have any symbols(s) you like...) or it can have words from each file (the first file then the second file) side by side.
To obtain a list of lines side by side, the first lines from the first file on the left side separated by a tab-stop then the first lines from the second file. You would type:
paste file1.txt file2.txt
To have the list displayed in serial, first line from first file, [Tab], second line from first file, then third and fourth until the end of the first file type:
paste --serial file1.txt file2.txt
This command is very simple to understand if you make yourself an example
Its much easier if you create an example for yourself. With just a couple of lines, I used "first line first file" and "first line second file" et cetera for a quick example.
Will convert tabs to spaces and output it. Use the option -t num to specify the size of a "tapstop", the number of characters between each tab.
Command syntax:
expand file_name.txt
- unexpand
Will convert spaces to tabs and output it.
Command syntax:
unexpand

