From 1026a621a682a5c2c9195235fca61e410b72616d Mon Sep 17 00:00:00 2001 From: booboy Date: Wed, 6 Sep 2017 22:45:34 -0500 Subject: [PATCH] fixed error that was happening with .bash_functions and made install.sh symlink .vim and .vimrc to users home dir --- .bash_functions | 12 ++++++------ .envars | 5 +++-- install.sh | 3 +++ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.bash_functions b/.bash_functions index c6c79f5..2c09287 100644 --- a/.bash_functions +++ b/.bash_functions @@ -234,20 +234,20 @@ suptime() LANG=C printf '%s (%.2fs ago)\n' "$(date -d @$timestamp)" $(bc <<<"$(date +%s.%N) - $timestamp") } -tcp +tcp() { - netstat -nap | egrep "^tcp6{0,1} " | tr "\t" " " \ + netstat -nap | egrep "^tcp6{0,1} " 2> /dev/null | tr "\t" " " \ | sed 's/ */ /g;s/ $//g' \ | egrep '^tcp6{0,1} [0-9]+ [0-9]+ [0.:]+:[0-9]+ [0.:]+:\* LISTEN ' \ | sed 's/^tcp[6 ]*[0-9]* [0-9]* [0.:]*:\([0-9]*\) [0.:]*:\* LISTEN \(.*\)/"\2","tcp",\1/' \ - | sed 's#^"[0-9]*/#"#' | sort -t"," -k3n | uniq + | sed 's#^"[0-9]*/#"#' | sort -t"," -k3n | uniq } -udp +udp() { - netstat -nap | egrep "^udp6{0,1} " | tr "\t" " " \ + netstat -nap | egrep "^udp6{0,1} " 2> /dev/null | tr "\t" " " \ | sed 's/ */ /g;s/ $//g' \ | egrep '^udp6{0,1} [0-9]+ [0-9]+ [0.:]+:[0-9]+ [0.:]+:\* ' \ | sed 's/^udp[6 ]*[0-9]* [0-9]* [0.:]*:\([0-9]*\) [0.:]*:\* \(.*\)/"\2","udp",\1/' \ - | sed 's#^"[0-9]*/#"#' | sort -t"," -k3n | uniq + | sed 's#^"[0-9]*/#"#' | sort -t"," -k3n | uniq } diff --git a/.envars b/.envars index 783d8b0..335a34e 100644 --- a/.envars +++ b/.envars @@ -5,9 +5,10 @@ export PATH=$PATH:$HOME/bin # Terminal color # green@white[abspath] -#export PS1="\[\e[32m\]\u\[\e[m\]@\H\[\e[36m\][\[\e[m\]\[\e[33m\]\w\[\e[m\]\[\e[36m\]]\[\e[m\]: " +export PS1="\[\e[32m\]\u\[\e[m\]@\H\[\e[36m\][\[\e[m\]\[\e[33m\]\w\[\e[m\]\[\e[36m\]]\[\e[m\]: " # red@white[abspath] -export PS1="\[\e[31m\]\u\[\e[m\]@\H\[\e[36m\][\[\e[m\]\[\e[33m\]\w\[\e[m\]\[\e[36m\]]\[\e[m\]: " +#export PS1="\[\e[31m\]\u\[\e[m\]@\H\[\e[36m\][\[\e[m\]\[\e[33m\]\w\[\e[m\]\[\e[36m\]]\[\e[m\]: " export EDITOR=vim export HISTTIMEFORMAT="%d/%m/%y %T " +export TERM=xterm-256color diff --git a/install.sh b/install.sh index 82fc29f..adba4f4 100755 --- a/install.sh +++ b/install.sh @@ -15,3 +15,6 @@ ln -sfv "$DOTFILES_DIR/.bashrc" ~ ln -sfv "$DOTFILES_DIR/.bash_aliases" ~ ln -sfv "$DOTFILES_DIR/.bash_functions" ~ ln -sfv "$DOTFILES_DIR/.envars" ~ + +ln -sfv "$DOTFILES_DIR/.vim" ~ +ln -sfv "$DOTFILES_DIR/.vimrc" ~