I was wondering, out of curiosity, if you can encode the bash script log of the entire command running in a Bash / SSH session. I know that I historyshould log all the teams, but it seems very unreliable!
This morning I was messing around with the following bash script that logs what the user starts in the terminal but does not execute all the commands correctly.
prompt_read() {
echo -n "$(whoami)@$(hostname):$(pwd)~$ "
read userinput
}
prompt_read
while :; do
if [[ $userinput != exit ]]; then
logger "logit $userinput"
bash -c "$userinput"
prompt_read
else
kill -1 $PPID
fi
done
Does anyone know anything that makes teams better and more reliable than history
Greetings
source
share