#!/bin/bash
# Filename:Log_Format.sh
# Description: Unix/Linux Log Format
# Author: shuhui.qiu
# Version: 1.0

function log_formart()
{
	if [[ $(id -u) -ne '0' ]]
	then
		echo -en "\n\nexport HISTFILESIZE=10000\nexport HISTSIZE=10000\nexport PROMPT_COMMAND=\"history -a\"\nexport HISTTIMEFORMAT=\"\$(whoami) %F %T \"" >> ${HOME}/.bashrc
	else
		echo -en "\n\nexport HISTFILESIZE=10000\nexport HISTSIZE=10000\nexport PROMPT_COMMAND=\"history -a\"\nexport HISTTIMEFORMAT=\"\$(whoami) %F %T \"" >> /etc/profile

	fi
}

log_formart
