diff --git a/.bash_aliases b/.bash_aliases index b8fc4a9..ad0a19a 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -1,3 +1,4 @@ # aliases alias ll='ls -lah' +alias ls='ls --color=auto diff --git a/.bash_functions b/.bash_functions index 126da40..00ba38f 100644 --- a/.bash_functions +++ b/.bash_functions @@ -90,6 +90,7 @@ swap_sum() # Extra many types of compressed packages # Credit: http://nparikh.org/notes/zshrc.txt extract() + { if [ -f "$1" ]; then case "$1" in @@ -112,3 +113,51 @@ extract() echo "'$1' is not a valid file to extract" fi } + +#global_python() +#{ +# export PATH=$PATH +# +#} + +user_python() + +{ + [[ -d "$HOME/install/python" ]] && export PATH="$PATH:/install/python/bin" +} + +add_underscore() + +{ + sed -e s'/ /_/g' #single line to rename from pipe +} + +rot13() + +{ + if [ -r $1 ]; then cat $1 | tr '[N-ZA-Mn-za-m5-90-4]' '[A-Za-z0-9]'; else echo $* | tr '[N-ZA-Mn-za-m5-90-4]' '[A-Za-z0-9]'; fi +} + +histupdate() + +{ + history -a; history -n +} + +mostusedcmds() + +{ + history | awk '{ print $2}' | sort | uniq -c | sort -rn | head +} + +on() + +{ + + user="$1" + + if who | grep "^$user " > /dev/null; then + echo "$user is logged in" + fi + +} diff --git a/bin/html_doc.sh b/bin/html_doc.sh new file mode 100755 index 0000000..2d1c7f8 --- /dev/null +++ b/bin/html_doc.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +cat << HTML_TEMPLATE + + +
+ +