\x20\40\x20\40 HEX
HEX
Server: Apache
System: Linux web1.jenscom.net 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64
User: sps (1059)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: //proc/thread-self/root/etc/profile.d/bash_eternal_history.sh
# Enable icrnl flag for serial devices. Without this, "enter" key presses
# through the console (virsh console or LW::Provision::SerialPort) will not be
# recognized.
tty_dev=$(tty | awk '/\/dev\/ttyS/ {print $1}')
if [[ ${tty_dev} == *tty* ]]; then
	stty -F ${tty_dev} icrnl
	set +o history
	trap $(sync) EXIT
fi

HISTTIMEFORMAT="%Y%m%d - %H:%M:%S - "
alias ll='ls -al --color=auto'

# LiquidWeb "ehistory" setup. This was moved to the end, because it was previously discovered things
# like cPanel installation, will hard clobber /etc/bashrc. By moving this to the end, we remove these
# fun variables.
# LW Alias'

function prm1() {
	local ehist_log='/usr/local/lp/logs/bash_eternal_history'
	[[ -w ${ehist_log} ]] || return
	local last_cmd=$(history 1)
	[[ -n ${EHIST_LAST_COMMAND} ]] && [[ ${EHIST_LAST_COMMAND} == ${last_cmd} ]] && return
	echo "$(
		mytty=$(tty | awk '{print substr($0,6)}')
		who | grep -P "${mytty}\s+" | awk '{print $1, $2, $5}'
	) ${last_cmd}" >>${ehist_log}
	export EHIST_LAST_COMMAND=${last_cmd}
}
[[ -n $(tty | awk '/\/dev\/ttyS/ {print $1}') ]] || PROMPT_COMMAND=prm1