title image


Smiley Re: Bash und Escape-Zeichen
Im Bash Prompt HOWTO auf http://www.linuxdoc.org ist es einfach erklaert.

Deine Escape sequenze muss geschachtelt werden:



\[ANSI-ESCAPE-SEQUENCE\]





ich haenge mal einen Auszug meiner .bashrc an



Gruss TheSegfault





#!/bin/sh

# Ansi - Colours/ -Codes:



# Black 0;30 Dark Gray 1;30

# Blue 0;34 Light Blue 1;34

# Green 0;32 Light Green 1;32

# Cyan 0;36 Light Cyan 1;36

# Red 0;31 Light Red 1;31

# Purple 0;35 Light Purple 1;35

# Brown 0;33 Yellow 1;33

# Light Gray 0;37 White 1;37



# 00 for normal display (or just 0)

# 01 for bold on (or just 1)

# 02 faint (or just 2)

# 03 standout (or just 3)

# 04 underline (or just 4)

# 05 blink on (or just 5)

# 07 reverse video on (or just 7)

# 08 nondisplayed (invisible) (or just 8)

# 22 normal

# 23 no-standout

# 24 no-underline

# 25 no-blink

# 27 no-reverse

# 30 black foreground

# 31 red foreground

# 32 green foreground

# 33 yellow foreground

# 34 blue foreground

# 35 magenta foreground

# 36 cyan foreground

# 37 white foreground

# 39 default foreground

# 40 black background

# 41 red background

# 42 green background

# 43 yellow background

# 44 blue background

# 45 magenta background

# 46 cyan background

# 47 white background

# 49 default background



## normal prompt

#PS1='\u:\w\$ '



# Green prompt:

#PS1='\[\033[32m\]\u:\w\$\[\033[0m\] '



## light blue prompt:

#PS1='\[\033[1;34m\]\u:\w\$\[\033[0m\] '



## light cyan prompt:

#PS1='\[\033[1;36m\]\u:\w\$\[\033[0m\] '



#pink prompt:

#PS1='\[\033[1;35m\]\u:\w\$\[\033[0m\] '



#light red prompt:

#PS1='\[\033[1;31m\]\u:\w\$\[\033[0m\] '



# light red prompt on blue background:

#PS1='\[\033[44m\]\[\033[1;31m\]\u:\w\$\[\033[0m\] '



# very colourfull prompt for xterms

#PS1='\[\033[4m\]\[\033[1;31m\]\u\[\033[24m\]:\[\033[30m\]\w\[\033[1;34m\]\$\[\033[0m\] '



# same as line above except for the underline part (problems with the console)

#PS1='\[\033[1;31m\]\u\[\033[24m\]:\[\033[30m\]\w\[\033[1;34m\]\$\[\033[0m\] '



# l-blue l-green pink

#PS1='\[\033[1;34m\]\u\[\033[1;32m\]:\[\033[1;35m\]\w\$\[\033[0m\] '



# user-name in reversed video then colon and path followed by a '$' in light red:

PS1='\[\033[7m\]\u\[\033[27m\]:\[\033[1;31m\]\w\$\[\033[0m\] '



LANG=de_DE

PATH=${PATH}:/home/hfob/bin

LOCALDOMAIN="informatik.uni-tuebingen.de zdv.uni-tuebingen.de uni-tuebingen.de"

CFLAGS="-O3 -march=i686"

CXXFLAGS=$CFLAGS

export DISPLAY PS1 LANG PATH LESS LOCALDOMAIN CFLAGS CXXFLAGS



setterm -blength 15 -bfreq 100 -store

umask 077

mesg y



# below i am printing out messages throught stderr because

# scp doesn't seem to work, when i use stdout

df 1>&2

echo 1>&2

fortune 1>&2







geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: