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 ...
  • 05.Oct.08
    Moving around shell | fernape | (0)
    One of the things that annoys newbies the most is moving around using a shell. Most people thing it is easier and faster if you use the mouse and goes clicking around. The fact is that shells provide a lot of useful features for efficiently traversing the filesystem hierarchy. Here are some hints. Note: Some of the features may vary from a shell to another or even between different versions of the same shell. I will use bash 3.00 for this post. The basics If you want to change to another directory, you use the following command: $ cd This is easy enough and probably ...