Skip to content

Instantly share code, notes, and snippets.

View nippyin's full-sized avatar

Sandeep Sharma nippyin

  • Mississauga
View GitHub Profile
@nippyin
nippyin / .bash_profile
Created January 17, 2021 22:43 — forked from tuxfight3r/.bash_profile
bash history log all commands to syslog
#log all your bash command to syslog
function log2syslog
{
declare COMMAND
COMMAND=$(fc -ln -0)
logger -p local1.notice -t bash -i -- "${USER}:${COMMAND}"
}
trap log2syslog DEBUG
#moredetails can be found here