View a “table” via the Linux command line

It’s very common to use the “less” command to view a table, maybe with the “-x 20” parameter to have a smaller chance of misaligned columns, but Google gave me much better way to view CSV (or TSV) files:

column -s, -t < file.csv | less -#2 -N -S

As you can see the “column” command allows to be customized in terms of field separator and much more.

Lightweight browser: small footprint but opening GMail

When in a need for a responsive browser I thought to be limited in my choice among fully featured browsers (Chromium) that nicely support javascript and HTML5, or stripped down crashing things (Arora, Midori?)…

Found a couple of alternatives:

  • QupZilla: it is fully featured… but in my hands still too crashy
  • uzbl ( blazing fast, fully featured browsing, zero features browser (type the address with a sort of vi-like console!)

Tab complete for SSH

This snippet from .bashrc/.bash_profile was gifted from Marcel Molina, but I thought I would share because it’s life changing. Put this in your .bashrc or .bash_profile:

SSH_COMPLETE=( $(cat ~/.ssh/known_hosts | \
cut -f 1 -d ‘ ’ | \
sed -e s/,.*//g | \
uniq | \
egrep -v [0123456789]) )
 complete -o default -W ”${SSH_COMPLETE[*]}” ssh

screen configuration file

Screen is a powerful utility to have multiple terminal opened. It’s handy to write a configuration file to add a status bar listing all terminal opened (like the taskbar of visual environments), and that dock to F11 and F12 (instead of F1 and F2) the shortcuts for next/previous screen. Here how to do:  

# Bind F11 and F12 (NOT F1 and F2) to previous and next screen window
bindkey -k F1 prev
bindkey -k F2 next
startup_message off

# Window list at the bottom.
hardstatus alwayslastline
hardstatus string "%-w%{= BW}%50>%n %t%{-}%+w%<"

The hardstatus creates a “task bar” listing all screens, with the active one highlighted. To understand switches, read this guide.