📄 cat
字号:
Processes the input files one at a time, selects all records that satisfy the _Q_U_E_R_Y, and prints them. The number of records selected from each file and the total number selected are printed. The output is run through the _m_o_r_e program (unless PAGER is set to a different program name; see ENVIRONMENT). If this command is interrupted with one interrupt character, then printing of the records is suspended, but the selection contin- ues. The total records that match the _Q_U_E_R_Y will be printed as usual. If the command is interrupted for a second time the command will quit without checking additional records. SSSSHHHHoooowwww TTTToooo _f_l_a_g_s Copyright Entropic Research Laboratory, Inc. 4G4 4SELECT(1-ESPS) ENTROPIC RESEARCH LAB Runs _p_s_p_s on _o_u_t_p_u_t. Any of the _p_s_p_s flags may be specified. The output is run through the _m_o_r_e program (unless PAGER is set to a different program name; see ENVIRONMENT). SSSSIIIIzzzzeeee Prints the number of records in the record buffer. TTTToooo _o_u_t_p_u_t [ WWWWiiiitttthhhh _f_i_e_l_d_n_a_m_e_1, _f_i_e_l_d_n_a_m_e_2, ...] TTTToooo _o_u_t_p_u_t [ WWWWiiiitttthhhhoooouuuutttt _f_i_e_l_d_n_a_m_e_1, _f_i_e_l_d_n_a_m_e_2, ...] Specifies an output file. If an output file has already been specified, _s_e_l_e_c_t closes it and opens the new one provided that the record buffer has not changed since the last write. If the record buffer has been changed since the last write, a warning is printed and no action is taken. If the TO command is then repeated as the next command, the existing output file is closed and the new one is opened. Note that an output file can be specified on the command line. An output file cannot be specified until an input file has been speci- fied. Furthermore, the output file, if it exists, must have a compatible header with that of the first input file (same field definitions). If the output file does not exist, the WWWWiiiitttthhhh clause can be used to specify which fields from input records will be written to the output file, or the WWWWiiiitttthhhhoooouuuutttt clause can be used to specify which fields to omit. QQQQuuuuiiiitttt If the record buffer has not changed since the last write, _s_e_l_e_c_t exits. If the record buffer has been changed since the last write, a warning is printed and the user is asked to confirm the command. If the user responds to the confirmation request with "yes", then the program is terminated without writing the output file. UUUUnnnnddddoooo This command removes the records from the record buffer resulting from the last Select command. This command can only be given between a Select and a Write. Undo cannot be undone. VVVVeeeerrrrssssiiiioooonnnn Prints out the version number and the date of the last edit (actually, the date of the last modification of the SCCS database where _s_e_l_e_c_t is maintained). WWWWrrrriiiitttteeee If _o_u_t_p_u_t does not exist (see the TO command), it is created and the contents of the record buffer are writ- ten to it. If _o_u_t_p_u_t exists, the contents of the record buffer are appended. The record buffer is then cleared. Copyright Entropic Research Laboratory, Inc. 5G5 5SELECT(1-ESPS) ENTROPIC RESEARCH LABSSSSYYYYNNNNTTTTAAAAXXXX DDDDEEEETTTTAAAAIIIILLLLSSSS A _Q_U_E_R_Y consists of an expression, which has the following form: <expr> ::= <value> | <field_name>{[<index>]} | <character_string> | $<external_function> | <function> (<field_name>) | <function> (<expr>) | ( <expr> ) | <expr> <arith_op> <expr> | <expr> <rel_op> <expr> | - <expr> | <expr> Here, <field_name> is a FEA record field name, <index> is an integer value indicating an offset from the beginning of the field (used if the field is not a scaler), <value> is a numerical value, <character_string> is a character string in quotes ("), <function> is the name of a built in function (see FUNCTIONS), <rel_op> is a relational operator, and <arith_op> is a arithmetic operator (defined below). <external_function> is the name of an external program that is called to implement some function on each record. This is described in detail below. The "{}" brackets indicate that the inclusion of field index is optional. If <field_name> is not a scaler field, <field_name> is equivalent to <field_name>[0] when used in an expression. An <external_function> is always preceded by a dollar sign ($). If a <field_name> is used in an expression which is not defined in the current input file, then a warning is printed (once for each file) and zero is used as its value. This is not a fatal error, because there might be several input files open that do not have all of the same fields. The permitted relational are: Copyright Entropic Research Laboratory, Inc. 6G6 6SELECT(1-ESPS) ENTROPIC RESEARCH LAB____________________________________________________ |______________________<__r__e__l_____o__p__>_________________________|_ | == equals | | = equals | | != not equals | | > greater than | | >= greater than or equal to| | < less than | | <= less than or equal to | | && and | | & and | | || or | | | or | |_______________________________| The && has precedence over the || ; & and | are treated as synonyms for && and ||. There are no bitwise logical operations. The permitted arithmetic operators are: ____________________ | <arith_op> | |_______________________________________|_ | + addition | | - subtraction | | * multiplication| | / division | |_^____e_x_p_o_n_e_n_t_i_a_t_i_o_n__| The ^ operator has the highest precedence and is right asso- ciative. The / and * operators have the next highest pre- cedence and are left associative. The + and - operators have the lowest precedence and are also left associative. If <value> is a numerical value (appropriate if the type of the field is a numerical type), it should be given in a corresponding format for C constants. If the field type is coded, then <value> should be a quoted string (upper or lower case) that is one of the legal values. In the case of coded field types, the default behavior is for the comparison to be case insensitive. Comparisons can be made case sensitive by using the ----cccc option on the command line.FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS There are three types of functions supported by _s_e_l_e_c_t. One type of function takes as its domain a numerical value, which can be given as any expression that _s_e_l_e_c_t can pro- cess. Another type of function operates on a <field_name>. The third type of function is the <external_function>. This form of function results in an external program being called Copyright Entropic Research Laboratory, Inc. 7G7 7SELECT(1-ESPS) ENTROPIC RESEARCH LAB to perform some function on each record. This provides a very general capability, but since the external program will be called for each record processed it is much slower than built in functions. The available built in function are: __________________________ |__F__u__n__c__t__i__o__n__s____o__n____E__x__p__r__e__s__s__i__o__n__s___|_ | abs absolute value| | atan arc tangent | | cos cosine | | exp exponent | | int integer | | log natural log | | log10 log base 10 | | sin sine |
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -