📄 builtins.0
字号:
ffcc [--ee _e_n_a_m_e] [--llnnrr] [_f_i_r_s_t] [_l_a_s_t] ffcc --ss [_p_a_t=_r_e_p] [_c_m_d] Fix Command. In the first form, a range of commands from _f_i_r_s_t to _l_a_s_t is selected from the history list. _F_i_r_s_t and _l_a_s_t may be specified as a string (to locate the last command beginning with that string) or as a number (an index into the history list, where a negative number is used as an offset from the cur- rent command number). If _l_a_s_t is not specified it is set to the current command for listing (so that ``fc -l -10'' prints the last 10 commands) and to _f_i_r_s_t otherwise. If _f_i_r_s_t is not spec- ified it is set to the previous command for editing and -16 for listing. The --nn option suppresses the command numbers when listing. The --rr option reverses the order of the commands. If the --ll option is given, the commands are listed on standard output. Other- wise, the editor given by _e_n_a_m_e is invoked on a file containing those commands. If _e_n_a_m_e is not given, the value of the FFCCEEDDIITT variable is used, and the value of EEDDIITTOORR if FFCCEEDDIITT is not set. If neither variable is set, is used. When editing is complete, the edited commands are echoed and executed. In the second form, _c_o_m_m_a_n_d is re-executed after each instance of _p_a_t is replaced by _r_e_p. A useful alias to use with this is ``r="fc -s"'', so that typing ``r cc'' runs the last command beginning with ``cc'' and typing ``r'' re-executes the last com- mand. If the first form is used, the return value is 0 unless an invalid option is encountered or _f_i_r_s_t or _l_a_s_t specify history lines out of range. If the --ee option is supplied, the return value is the value of the last command executed or failure if an error occurs with the temporary file of commands. If the second form is used, the return status is that of the command re-exe- cuted, unless _c_m_d does not specify a valid history line, in which case ffcc returns failure. ffgg [_j_o_b_s_p_e_c] Resume _j_o_b_s_p_e_c in the foreground, and make it the current job. If _j_o_b_s_p_e_c is not present, the shell's notion of the _c_u_r_r_e_n_t _j_o_b is used. The return value is that of the command placed into the foreground, or failure if run when job control is disabled or, when run with job control enabled, if _j_o_b_s_p_e_c does not spec- ify a valid job or _j_o_b_s_p_e_c specifies a job that was started without job control. ggeettooppttss _o_p_t_s_t_r_i_n_g _n_a_m_e [_a_r_g_s] ggeettooppttss is used by shell procedures to parse positional parame- ters. _o_p_t_s_t_r_i_n_g contains the option characters to be recog- nized; if a character is followed by a colon, the option is expected to have an argument, which should be separated from it by white space. The colon and question mark characters may not be used as option characters. Each time it is invoked, ggeettooppttss places the next option in the shell variable _n_a_m_e, initializing _n_a_m_e if it does not exist, and the index of the next argument to be processed into the variable OOPPTTIINNDD. OOPPTTIINNDD is initialized to 1 each time the shell or a shell script is invoked. When an option requires an argument, ggeettooppttss places that argument into the variable OOPPTTAARRGG. The shell does not reset OOPPTTIINNDD automati- cally; it must be manually reset between multiple calls to ggeettooppttss within the same shell invocation if a new set of parame- ters is to be used. When the end of options is encountered, ggeettooppttss exits with a return value greater than zero. OOPPTTIINNDD is set to the index of the first non-option argument, and _n_a_m_e is set to ?. ggeettooppttss normally parses the positional parameters, but if more arguments are given in _a_r_g_s, ggeettooppttss parses those instead. ggeettooppttss can report errors in two ways. If the first character of _o_p_t_s_t_r_i_n_g is a colon, _s_i_l_e_n_t error reporting is used. In normal operation diagnostic messages are printed when invalid options or missing option arguments are encountered. If the variable OOPPTTEERRRR is set to 0, no error messages will be dis- played, even if the first character of _o_p_t_s_t_r_i_n_g is not a colon. If an invalid option is seen, ggeettooppttss places ? into _n_a_m_e and, if not silent, prints an error message and unsets OOPPTTAARRGG. If ggeettooppttss is silent, the option character found is placed in OOPPTTAARRGG and no diagnostic message is printed. If a required argument is not found, and ggeettooppttss is not silent, a question mark (??) is placed in _n_a_m_e, OOPPTTAARRGG is unset, and a diagnostic message is printed. If ggeettooppttss is silent, then a colon (::) is placed in _n_a_m_e and OOPPTTAARRGG is set to the option character found. ggeettooppttss returns true if an option, specified or unspecified, is found. It returns false if the end of options is encountered or an error occurs. hhaasshh [--llrr] [--pp _f_i_l_e_n_a_m_e] [--ddtt] [_n_a_m_e] Each time hhaasshh is invoked, the full pathname of the command _n_a_m_e is determined by searching the directories in $$PPAATTHH and remem- bered. Any previously-remembered pathname is discarded. If the --pp option is supplied, no path search is performed, and _f_i_l_e_n_a_m_e is used as the full file name of the command. The --rr option causes the shell to forget all remembered locations. The --dd option causes the shell to forget the remembered location of each _n_a_m_e. If the --tt option is supplied, the full pathname to which each _n_a_m_e corresponds is printed. If multiple _n_a_m_e argu- ments are supplied with --tt, the _n_a_m_e is printed before the hashed full pathname. The --ll option causes output to be dis- played in a format that may be reused as input. If no arguments are given, or if only --ll is supplied, information about remem- bered commands is printed. The return status is true unless a _n_a_m_e is not found or an invalid option is supplied. hheellpp [--ddmmss] [_p_a_t_t_e_r_n] Display helpful information about builtin commands. If _p_a_t_t_e_r_n is specified, hheellpp gives detailed help on all commands matching _p_a_t_t_e_r_n; otherwise help for all the builtins and shell control structures is printed. --dd Display a short description of each _p_a_t_t_e_r_n --mm Display the description of each _p_a_t_t_e_r_n in a manpage-like format --ss Display only a short usage synopsis for each _p_a_t_t_e_r_n The return status is 0 unless no command matches _p_a_t_t_e_r_n. hhiissttoorryy [[_n]] hhiissttoorryy --cc hhiissttoorryy --dd _o_f_f_s_e_t hhiissttoorryy --aannrrww [_f_i_l_e_n_a_m_e] hhiissttoorryy --pp _a_r_g [_a_r_g _._._.] hhiissttoorryy --ss _a_r_g [_a_r_g _._._.] With no options, display the command history list with line num- bers. Lines listed with a ** have been modified. An argument of _n lists only the last _n lines. If the shell variable HHIISSTTTTIIMMEE-- FFOORRMMAATT is set and not null, it is used as a format string for _s_t_r_f_t_i_m_e(3) to display the time stamp associated with each dis- played history entry. No intervening blank is printed between the formatted time stamp and the history line. If _f_i_l_e_n_a_m_e is supplied, it is used as the name of the history file; if not, the value of HHIISSTTFFIILLEE is used. Options, if supplied, have the following meanings: --cc Clear the history list by deleting all the entries. --dd _o_f_f_s_e_t Delete the history entry at position _o_f_f_s_e_t. --aa Append the ``new'' history lines (history lines entered since the beginning of the current bbaasshh session) to the history file. --nn Read the history lines not already read from the history file into the current history list. These are lines appended to the history file since the beginning of the current bbaasshh session. --rr Read the contents of the history file and use them as the current history. --ww Write the current history to the history file, overwrit- ing the history file's contents. --pp Perform history substitution on the following _a_r_g_s and display the result on the standard output. Does not store the results in the history list. Each _a_r_g must be quoted to disable normal history expansion. --ss Store the _a_r_g_s in the history list as a single entry. The last command in the history list is removed before the _a_r_g_s are added. If the HHIISSTTTTIIMMEEFFOORRMMAATT variable is set, the time stamp informa- tion associated with each history entry is written to the his- tory file, marked with the history comment character. When the history file is read, lines beginning with the history comment character followed immediately by a digit are interpreted as timestamps for the previous history line. The return value is 0 unless an invalid option is encountered, an error occurs while reading or writing the history file, an invalid _o_f_f_s_e_t is sup- plied as an argument to --dd, or the history expansion supplied as an argument to --pp fails. jjoobbss [--llnnpprrss] [ _j_o_b_s_p_e_c ... ] jjoobbss --xx _c_o_m_m_a_n_d [ _a_r_g_s ... ] The first form lists the active jobs. The options have the fol- lowing meanings: --ll List process IDs in addition to the normal information. --nn Display information only about jobs that have changed status since the user was last notified of their status. --pp List only the process ID of the job's process group leader.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -