[问题]几个shell问题
-
- 帖子: 47
- 注册时间: 2006-03-21 16:21
[问题]几个shell问题
看以下脚本:
1 # enable color support of ls and also add handy aliases
2 if [ "$TERM" != "dumb" ]; then
3 eval "`dircolors -b`"
4 alias ls='ls --color=auto'
5 #alias dir='ls --color=auto --format=vertical'
6 #alias vdir='ls --color=auto --format=long'
7 fi
8
9 # some more ls aliases
10 #alias ll='ls -l'
11 #alias la='ls -A'
12 #alias l='ls -CF'
13
14 # enable programmable completion features (you don't need to enable
15 # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
16 # sources /etc/bash.bashrc).
17 #if [ -f /etc/bash_completion ]; then
18 # . /etc/bash_completion
19 #fi
20
问题:
3 eval "`dircolors -b`" evall 是什么意思?
17 #if [ -f /etc/bash_completion ]; -f 前为何没有命令?
18 # . /etc/bash_completion 小数点是是什么意思?
1 # enable color support of ls and also add handy aliases
2 if [ "$TERM" != "dumb" ]; then
3 eval "`dircolors -b`"
4 alias ls='ls --color=auto'
5 #alias dir='ls --color=auto --format=vertical'
6 #alias vdir='ls --color=auto --format=long'
7 fi
8
9 # some more ls aliases
10 #alias ll='ls -l'
11 #alias la='ls -A'
12 #alias l='ls -CF'
13
14 # enable programmable completion features (you don't need to enable
15 # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
16 # sources /etc/bash.bashrc).
17 #if [ -f /etc/bash_completion ]; then
18 # . /etc/bash_completion
19 #fi
20
问题:
3 eval "`dircolors -b`" evall 是什么意思?
17 #if [ -f /etc/bash_completion ]; -f 前为何没有命令?
18 # . /etc/bash_completion 小数点是是什么意思?
-
- 帖子: 47
- 注册时间: 2006-03-21 16:21
-
- 帖子: 47
- 注册时间: 2006-03-21 16:21
还有:
case "$TERM" in
xterm-color)
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
;;
*)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
;;
esac
问题:
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' ${debian_chroot:+($debian_chroot)}怎么理解? \u@\h:\w\$又是什么意思?
case "$TERM" in
xterm-color)
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
;;
*)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
;;
esac
问题:
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' ${debian_chroot:+($debian_chroot)}怎么理解? \u@\h:\w\$又是什么意思?
-
- 帖子: 47
- 注册时间: 2006-03-21 16:21
-
- 帖子: 47
- 注册时间: 2006-03-21 16:21
-
- 帖子: 47
- 注册时间: 2006-03-21 16:21
- leal
- 帖子: 1119
- 注册时间: 2005-08-29 14:49
- 来自: 杭州
- 联系:
- leal
- 帖子: 1119
- 注册时间: 2005-08-29 14:49
- 来自: 杭州
- 联系:
-
- 帖子: 7
- 注册时间: 2006-04-08 13:35