Archive for the tag 'bash'

 

 

Oct 06 2016

Processing CSV Files with Perl and Bash

Published by under Linux

Olivier, a friend of mine, had to parse a CSV file and took the opportunity to benchmark the performance of 3 programming languages.   The file contains server names and disks he needs to add up into a hash table in order to get the total disk space for each server. He assumes on his […]

No responses yet

Dec 29 2009

Bash Colored Root Prompt

Published by under Linux

From Linux Suse /etc/bash.bashrc: # Colored root prompt (see bugzilla #144620) if test “$UID” -eq 0 -a -t && type -p tput > /dev/null 2>&1 ; then _bred=”$(tput bold 2> /dev/null; tput setaf 1 2> /dev/null)” _sgr0=”$(tput sgr0 2> /dev/null)” PS1=”\[$_bred\]$PS1\[$_sgr0\]” unset _bred _sgr0 fi

No responses yet