(Video materials in preparation)
txtmv : Moves the position of text.
Usage : txtmv <y> <x> <file>
txtmv -f[<string>] <y> <x> <file>
Version : Mon Mar 18 07:54:16 JST 2013
Moves an entire text file to a specified position.
Arguments <x> and <y> are the horizontal and vertical start
positions for the text to be moved.
Position is specified as a number of characters.
This command is used mostly together with the "overlay" command
to generate reports by combining multiple formatted text files.
(Original Data)
$ cat data1
*Grades Per Class
No Name A B C D E
=======================
000 Smith 91 59 20 76 54
001 Jones 46 39 8 5 21
003 Wilson 30 50 71 36 30
004 Drake 58 71 20 10 6
005 Hawking 82 79 16 21 80
007 Newton 50 2 33 15 62
Move "data1" to the right 20 characters.
$ txtmv 0 20 data1
*Grades Per Class
No Name A B C D E
=======================
000 Smith 91 59 20 76 54
001 Jones 46 39 8 5 21
003 Wilson 30 50 71 36 30
004 Drake 58 71 20 10 6
005 Hawking 82 79 16 21 80
007 Newton 50 2 33 15 62
→ moved right 20 characters
Move "data1" right 8 characters and down 3 lines.
$ txtmv 0 20 data1
--------------
↓
↓ Move down 3 lines
↓
*Grades Per Class
No Name A B C D E
=======================
000 Smith 91 59 20 76 54
001 Jones 46 39 8 5 21
003 Wilson 30 50 71 36 30
004 Drake 58 71 20 10 6
005 Hawking 82 79 16 21 80
007 Newton 50 2 33 15 62
→→→→ Move right 8 characters
Move Field
If you use the -f option you can move a specified field.
The skipped fields are padded with "@" by default.
$ cat data
1 2 3
4 5 6
$ txtmv -f 1 2 data
@ @ @ @ @
@ @ 1 2 3
@ @ 4 5 6
$ txtmv -f0 1 2 data
0 0 0 0 0
0 0 1 2 3
0 0 4 5 6