98 lines
1.7 KiB
Bash
98 lines
1.7 KiB
Bash
|
|
|
|
# Global Variable
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
export PAGER=less
|
|
export MANPAGER="less -isr"
|
|
export EDITOR=emacs
|
|
|
|
|
|
|
|
|
|
|
|
# CatVal
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
cateval()
|
|
{
|
|
while read line
|
|
do
|
|
eval $line 2>/dev/null
|
|
eval echo $( echo $line | sed -e 's/"/\"/g')
|
|
done <$1
|
|
}
|
|
|
|
export -f cateval
|
|
|
|
|
|
|
|
|
|
|
|
# Print
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
print()
|
|
{
|
|
if [[ "$1" == "-i" ]]
|
|
then
|
|
shift
|
|
|
|
str="%s"'\\n'
|
|
else
|
|
str="%s"'\n'
|
|
fi
|
|
|
|
printf "${str}" "$*"
|
|
}
|
|
|
|
export -f print
|
|
|
|
|
|
|
|
|
|
|
|
# File Enable
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
file_enable()
|
|
{
|
|
fd_file="$1"
|
|
fd_state="$2"
|
|
|
|
|
|
if [[ "$fd_state" == "TRUE" ]]
|
|
then
|
|
if [[ ! -f "${fd_file}" ]]
|
|
then
|
|
mv ${fd_file}.disable ${fd_file}
|
|
fi
|
|
else
|
|
if [[ -f "${fd_file}" ]]
|
|
then
|
|
mv ${fd_file} ${fd_file}.disable
|
|
fi
|
|
fi
|
|
}
|
|
|
|
export -f file_enable
|
|
|
|
|
|
|
|
|
|
|
|
# Include
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
. /usr/lib/rx3/isl.bash
|
|
|
|
|
|
|
|
|
|
|
|
# Aliases
|
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
alias ll="ls -la"
|
|
alias em="emacs"
|