8fc01f4dc649740449c56f2ab0b997b0171a4480 clmfisch Wed Dec 7 16:25:30 2016 -0800 Testing. New to this, excited to learn conventions diff --git src/utils/columnsToGrid.sh src/utils/columnsToGrid.sh index 72bf84b..1f39ec6 100755 --- src/utils/columnsToGrid.sh +++ src/utils/columnsToGrid.sh @@ -8,30 +8,31 @@ # Tag storms are one way of overcoming this challenge: they are easy for computers to parse, reduce the redundancy of a tab-separated file, and they are easily human readable. However, in other aspects of our work we are still largely stuck with text files organized into rows and columns. # # We stare at these files all day, so visually organizing them for a quick look has been a huge time saver for me (and prevented a lot of simple mistakes). Without tools like this, we'd have to perform a tedious series of cut commands or traverse our screen doing a lot of counting of columns, trying to figure out how blocks of text map. # # This program allows you to view data as a grid, and allows you to define which delimiter you'd like to use (tab is used by default). ################################################################################# # Usage ################################################################################# # Run program with no arguments for usage. ################################################################################# # Limitations/to do ################################################################################# # I want to truncate columns, probably using something like sed 's/\(.\{1,50\}\).*/\1/' this way there's no wrapping around the terminal (in which case, columns is a better program) +# Some users of older shells report issues. Detect if user is running bash/zsh, otherwise exit. ################################################################################# # Configuration ################################################################################# reset=$(echo -en "\e[0m") # Some of my commonly-used background colors: bg25=$(echo -en "\e[48;5;25m") bg107=$(echo -en "\e[48;5;107m") bg117=$(echo -en "\e[48;5;117m") bg196=$(echo -en "\e[48;5;196m") bg201=$(echo -en "\e[48;5;201m") bg202=$(echo -en "\e[48;5;202m") bg240=$(echo -en "\e[48;5;240m") # Some of my commonly-used foreground colors: color25=$(echo -en "\e[38;5;25m")