2022-04-29 13:17:24 +00:00
|
|
|
function csv {
|
|
|
|
# Format and display csv files in terminal
|
|
|
|
if [ $# -lt 1 ]; then
|
|
|
|
echo "Please specify file name"
|
|
|
|
elif [ -f $1 ]; then
|
|
|
|
# https://stackoverflow.com/questions/1875305/view-tabular-file-such-as-csv-from-command-line
|
|
|
|
column -s, -t < $1 | less -#2 -N -S
|
|
|
|
else
|
|
|
|
echo "$1: File not found"
|
|
|
|
#exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2021-09-29 17:44:12 +00:00
|
|
|
# Set primary prompt
|
|
|
|
PS1='fam@ubu:\w\$ '
|
|
|
|
|
|
|
|
# Ubuntu aliases
|
|
|
|
alias ll='ls -alF'
|
|
|
|
|
|
|
|
# More aliases
|
|
|
|
alias tmux='tmux -u'
|
|
|
|
alias calsh='bash /home/calsh.sh'
|
2022-03-22 16:38:45 +00:00
|
|
|
|
2021-09-29 17:44:12 +00:00
|
|
|
alias sml='rlwrap sml'
|
2022-03-22 16:38:45 +00:00
|
|
|
alias ghci='rlwrap ghci'
|
2022-04-29 13:17:24 +00:00
|
|
|
|