Benutzer-Werkzeuge

Webseiten-Werkzeuge


links:console

Konsolenspielereien

Bash-Logins

PROMPT

[UHRZEIT@PFAD:RETURNVALUE]

#PS1="[033[0;31m]A [033[0;34m\][\W] [033[0;32m\] \$? :[033[0m\]"
#PS1="[033[0;31m]A [033[0;35m\][[033[0;34m]W[033[0;35m\|]][033[0;32m\] \$? [033[0;35m\]:[033[0m\]"
export PS1="[[033[38;5;1m]t\[$(tput sgr0)][\033[38;5;11m\]@\[$(tput sgr0)][\033[38;5;4m]W\[$(tput sgr0)][\033[38;5;11m\]:\[$(tput sgr0)][\033[38;5;2m]$?\[$(tput sgr0)][\033[38;5;15m][$(tput sgr0)\|]] "

.bashrc

PATH=$HOME/bin:$PATH
export PATH
 
[ -r /usr/share/bash-completion/bash_completion   ] && . /usr/share/bash-completion/bash_completion
 
#Verwendete Farben
ROT="[033[0;31m\]"
GRU="[033[0;32m\]"
BLU="[033[1;34m\]"
WHI="[033[0m\]"
LIL="[033[0;35m\]"
ORA="[033[0;33m\]"
GRY="[033[0;37m\]"
#TUX='\ue000'
#GLIDER='\n\u2840\u2841\u2842'
 
#  time@[retval]:directory#
## 13:37:00@[0]:dir$
PS1="$ROT\t$LIL@$GRU[\$?]$LIL:$BLU\W$LIL\$ $WHI "
 
# user@[[retval|]]:directory#
## tux@[[0|]]:dir$
PS1="$ROT\u$LIL@$GRU[[\$|]]$LIL:$BLU\W$LIL\4$WHI "
 
# user@hostname:fullpath (retval)
# tux@computer:~/dir (0)
PS1="$ROT\u$LIL@$GRU\h$LIL:$BLU\w $LIL(\$?)$WHI "
 
# user@hostname:fullpath (retal)
## tux@computer:dir (0)
PS1="$LIL[$ORA\t$LIL]($ORA\$?$LIL):$GRY$_\n$ROT\u$LIL@$GRU\h$LIL:$BLU\W$WHI "
 
# ⡀⡁⡂ [time] retval: last command
# user@computer:directory
## ⡀⡁⡂ [13:37:42] 0: history -d
## tux@computer:dir
PS1=$'\n\u2840\u2841\u2842 [033[0;35m\][[033[0;33m]\t[033[0;35m\|]] [033[0;33m\]$?[033[0;35m\]:[033[0;37m\] $(history|tail -n1| sed -e "s/[0-9 ]*//"|cut -c1-55) \n[033[0;31m]u[033[0;35m\]@[033[0;32m]h[033[0;35m\]:[033[1;34m]W[033[0m\] '
 
## Rot für root und grün für user:
if [[ $(id -u) -ne 0 |]] ; then
PS1=$'[033[1;32m]n \u2840\u2841\u2842 [033[0;35m\][[033[0;33m]\t\b\b\b[033[0;35m\|]] [033[1;35m\]$?[033[0;35m\]=[033[0;37m\]$(history|tail -n1| sed -e "s/[0-9 ]*//"|cut -c1-
55) \n[033[0;31m]u[033[0;35m\]@[033[0;32m]h[033[0;35m\]:[033[1;34m]W[033[1;33m]ue000[033[0m\]'
else
PS1=$'[033[1;31m]n \u2840\u2841\u2842 [033[0;35m\][[033[0;33m]\t\b\b\b[033[0;35m\|]] [033[1;33m\]$?[033[0;35m\]=[033[0;37m\]$(history|tail -n1| sed -e "s/[0-9 ]*//"|cut -c1-55) \n[033[0;31m]u[033[0;35m\]@[033[0;32m]h[033[0;35m\]:[033[1;34m]W[033[0m\] '
fi
 
export PS1
alias matrix="cmatrix -nsC yellow"

gewünschtes Script einfach in der .bashrc aufrufen oder gleich einfügen

#!/bin/sh
# Author: butzel
# Name: IBM-Thinkpad.logo.sh
ROT='^[[31m    '
GRU='^[[32m  '
BLU='^[[34m  '
WHI='^[[37m'
clear
echo
echo $ROT"T"$GRU"u"$BLU"x"$WHI" p a d "
echo $BLU "             powered by"
echo
echo $ROT "           IIIIIIIIII" $GRU "  BBBBBBBBB   " $BLU " MMMM       MMMM"
echo $ROT "           IIIIIIIIII" $GRU "  BBBBBBBBBB  " $BLU " MMMMM     MMMMM"
echo $ROT "               II    " $GRU
                                    
links/console.txt · Zuletzt geändert: von adlerweb