The Archives

  • 10.Aug.17
    Interlacing file lines shell | fernape | (0)
    Recently I needed to mix several files into one single file. The point was that I needed to interlace the files so I had all the first lines of every file followed by all the second lines and so on. Put it simply, this is what I had: fapesteguia@fapesteguia:~/test$ cat file1 file 1 row 1 file 1 row 2 file 1 row 3 file 1 row 4 file 1 row 5 file 1 row 6 file 1 row 7 file 1 row 8 file 1 row 9 file 1 row 10 fapesteguia@fapesteguia:~/test$ cat file2 file 2 row 1 file 2 row 2 file 2 row 3 file 2 row 4 file 2 row 5 file 2 row 6 file ...
  • 03.Oct.09
    Vim. Copy & Paste shell | fernape | (1)
    Copy & Paste are two of the most important operations when writing a text. It is easy to know why: you save a lot of time. Vim handles copy & paste powerfully and gracefully. In Vim you can yank (copy), cut and paste text objects. There are two basic ways for selecting text: either using the normal vim commands or going into visual mode. Let us see all of this with some examples: This is a sample text (Bold letters indicate the cursor position as in the previous issues.) Now type: yw followed by ESC o As you can expect, you have just yanked a word ...