cowboy 发表于 2004-11-8 22:31:10

求bash shell提示符中quot;uquot;,quot;hquot;等其他转移字

我们知道在bash shell提示符中,\u表示当前用户,\h表示当前主机名。

还有哪些呢?哪个兄弟能够给个完整的列表?

我先贴一部分
            \t   the current time in HH:MM:SS format
            \d   the datein"WeekdayMonthDate"format
            \s   thenameofthe shell, the basename of $0
            \w   the current working directory
            \W   the basename of the currentworkingdirectory
            \u   the uname of the current user
            \h   the hostname
            \#   the command number of this command
            \!   the history number of this command
            \$   ifthe effective UID is 0, a #, otherwise a $

MichaelBibby 发表于 2004-11-9 07:02:57

Re: 求bash shell提示符中quot;uquot;,quot;hquot;等其他转移字

哪个兄弟能够给个完整的列表?
你的列表差不多已经全了 :-)

这里有以前讨论过的一个问题,关于 Shell 提示符:
http://www.linuxfans.org/nuke/modules.php?name=Forums&file=viewtopic&t=69879&start=0&postdays=0&postorder=asc&highlight=
页: [1]
查看完整版本: 求bash shell提示符中quot;uquot;,quot;hquot;等其他转移字