Last active
August 27, 2017 18:39
-
-
Save erincerys/0756ce3b7b38c5129397e0ab40354e07 to your computer and use it in GitHub Desktop.
Bash configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# maintenance | |
alias sysupgrade='yaourt -S -y -u --aur' | |
# operations | |
function gpkill () { | |
if [ $1 ] ; then | |
TargetPid=`pgrep $1` | |
echo 'Sending sigterm' | |
kill -15 $TargetPid | |
sleep 2 | |
if [ "`pgrep $1`" ] ; then | |
echo 'Sending sighup' | |
pkill -9 $TargetPid | |
if [ "`pgrep $1`" ] ; then | |
echo 'Either multiple processes are running or pid is defunct!' | |
fi | |
else | |
echo 'Process gracefully exited.' | |
fi | |
fi | |
} | |
export gpkill |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# ~/.bash_profile | |
# | |
[[ -f ~/.bashrc || -h ~/.bashrc ]] && . ~/.bashrc | |
[[ -f ~/.bash_aliases || -h ~/.bash_aliases ]] && . ~/.bash_aliases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS1='\n\D{%Y-%m-%d %H:%M:%S} \n\u@\h ($?) \W\$ ' | |
export HISTCONTROL=ignoreboth |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment