有关$的问题.

有关$的问题.

1,"${p//[0-9]/}"
2,"$$"
3,"${CONSOLETYPE:-}"
分别代表什么意思呢?
1是否是代表p1,p2之类的变量,如果是这样的话一个/就够了,为什么还要用两个呢?      
复制内容到剪贴板
代码:
[color=blue]-(guest@mac:tty1)-(tmp)-
[472 0] %[/color] p=a0b1c2z9
[color=blue]-(guest@mac:tty1)-(tmp)-
[472 0] %[/color] echo ${p//[0-9]/}
abcz
[color=blue]-(guest@mac:tty1)-(tmp)-
[472 0] %[/color] echo "PID of current bash: $$"
PID of current bash: 472
[color=blue]-(guest@mac:tty1)-(tmp)-
[472 0] %[/color] var=
[color=blue]-(guest@mac:tty1)-(tmp)-
[472 0] %[/color] echo ${var:-This my default value}
This my default value
[color=blue]-(guest@mac:tty1)-(tmp)-
[472 0] %[/color] var=hello
[color=blue]-(guest@mac:tty1)-(tmp)-
[472 0] %[/color] echo ${var:-This my default value}
hello
[color=blue]-(guest@mac:tty1)-(tmp)-
[472 0] %[/color]
      
上面这个人linux命令前缀好特别:)――