Displaying keyword search results 1 - 3
Created by magnum on May 06, 2011 12:26:14 Last update: May 06, 2011 12:26:14
The bash environment variable PROMPT_COMMAND contains a regular bash command that is executed just before the command prompt is displayed. For example:
$ export PROMPT_COMMAND=a bash: a: command not ...The command a is not valid so you get the error message every time you hit enter. Echo something before $PS1 :
$ export PROMPT_COMMAND='echo -n Hi!' Hi!$ ...PROMPT_COMMAND is regularly used to change the xterm window title. You may find this in /etc/bashrc :
case $TERM in xterm*) if [ -...
Created by Dr. Xi on December 04, 2009 04:33:05 Last update: December 04, 2009 04:33:05
Variable Meaning $_ The default or implicit variable. @_ Within a subroutine the array @_ contains the parameters passed to that subroutine. $a, $b Special package variables when using sort() $<digit> Contains the subpattern from the corresponding set of capturing parentheses from the last pattern match, not counting patterns matched in nested blocks that have been exited already. $. Current line number for the last filehandle accessed. $/ The input record separator, newline by default. $| If set to nonzero, forces a flush right away and after every write or print on the currently selected output channel. Default is 0 (regardless of whether the channel is really buffered by the system or not; $| tells you only whether you've asked Perl explicitly to flush after...
Created by Dr. Xi on September 23, 2008 20:43:58 Last update: September 23, 2008 20:43:58
Variable Description $0 The name of the ruby script file $* The command line arguments $$ Ruby interpreter's process ID $? Exit status of last executed child process $_ String last read by gets $. Line number last read by interpreter $! Last error message $@ Location of error $& String last matched by regexp $~ The last regexp match, as an array of subexpressions $n the nth subexpression in the last match (same as $~ ) $= Sase-insensitivity flag $/ Input record separator $\ Output record separator