create text tables from delimited files.

2013-07-12 1 min read Bash Fedora

To create simple text tables to paste in emails or to use in any other document where you want to show a table, here is something that you can use. There is a perl module which provides “tablify“. And here is how to use it:

sudo yum install perl-Text-RecordParser

This will install a command “tablify” that you can use in number of ways. Here is a simple example to use it. You can read the man pages to see how you can use it.

Continue reading

write the output of a command to /var/log/user.log… each line will contain $USER, making this easy to grep for.

2010-12-28 2 min read Bash Learning Linux

write the output of a command to /var/log/user.log… each line will contain $USER, making this easy to grep for.

  <td>
    <div class="text codecolorer">
      &nbsp;log() { (echo "$ $@";$@) | logger -t $USER; }
    </div>
  </td>
</tr>
1

This command is useful if you want to copy the output of a series of commands to a file, for example if you want to pastebin the output from ‘uname -a’, ‘lspci -vvv’ and ‘lsmod’ for video driver trouble-shooting on your favorite Linux forum.

Continue reading