📄 sc.1
字号:
.TP.B TWrite a listing of the current database to a file,but include delimiters suitable for processing by the.IR tbl ,.IR LaTeX ,or.I TeXtable processors.The delimiters are controlled by the.I tblstyleoption. See.I Setabove.The delimters are are a colon\ (:) for style.IR 0 or tbland an ampersand\ (&) for style.IR latex or tex ..\" ----------.PPWith the.IR Put ,.IR Write ,and.I Tablecommands, the optional range argument writes a subset of the spreadsheet tothe output file..\" ----------.PPWith the.I Writeand.I Tablecommands, if you try to write to the last file used with the.I Getor.I Putcommands, or the file specified on the command line when.I scwas invoked, you are asked to confirmthat the (potentially) dangerous operation is really what you want..\" ----------.PPThe three output commands,.IR Put ,.IR Write ,and.IR Table ,can pipe their (unencrypted only) output to a program.To use this feature,enter ``| program'' to the prompt asking for a filename.For example, to redirect the output of the.I Writecommand to the printer,you might enter ``| lpr -p''..\" ----------.TP.B MMerge the database from the named file into the current database.Values and expressions defined in the named fileare read into the current spreadsheetoverwriting the existing entries at matching cell locations..\" ----------.TP.B RRun macros.Since.I scfiles are saved as ASCII files,it is possible to use them as primitive macro definition files.The.I Runcommand makes this easier.It's like the.I Mergecommand,but prints a saved path name as the start of the filename to merge in.The string to use is set with the.I Definecommand.To write macros, you must be familiar with the file format written by the.I Putcommand.This facility is still primitive and could be much improved..\" ----------.TP.B DDefine a path for the.I Runcommand to use..\" ----------.PPAll file operations take a filename as the first argumentto the prompt on the top line.The prompt supplies a " to aid in typing in the filename.The filename can also be obtained from a cell's label stringor string expression.In this case, delete the leading " with the backspace keyand enter a cell name such as.I a22instead.If the resulting string starts with ``|'',the rest of the string is interpreted as a.SM UNIXcommand, as above..\" ==========.SS "Row and Column Commands".\" ----------These commands can be used on either rows or columns.The second letter of the command is either a row designator(one of the characters.IR r ,.IR ^B ,.IR ^F ,.IR h ,.IR l )or a column designator (one of.IR c ,.IR ^P ,.IR ^N ,.IR k ,.IR j ).A small menu lists the choices for the second letterwhen you type the first letter of one of these commands.Commands which move or copy cellsalso modify the row and column references in affected cell expressions.The references may be frozen by using the.I fixedoperator or using the.I $character in the reference to the cell (see below)..\" ----------.TP.B "ir, ic"Insert a new row (column)by moving the row (column) containing the cell cursor,and all following rows (columns), down (right) one row (column).The new row (column) is empty..\" ----------.TP.B "ar, ac"Append a new row (column) immediately following the current row (column).It is initialized as a copy of the current one..\" ----------.TP.B "dr, dc"Delete the current row (column)..\" ----------.TP.B "pr, pc, pm"Pull deleted rows (columns) back into the spreadsheet.The last deleted set of cells is put back into the spreadsheetat the current location..I prinserts enough rows to hold the data..I pcinserts enough columns to hold the data..I pm(merge) does not insert rows or columns;it overwrites the cells beginning at the current cell cursor location..\" ----------.TP.B "vr, vc"Remove expressions from the affected rows (columns),leaving only the values which were in the cellsbefore the command was executed..\" ----------.TP.B "zr, zc"Hide (``zap'') the current row (column).This keeps a row (column) from being displayed but keeps it in the data base.The status of the rows and columns is saved with the data base so hiddenrows and columns will be stillbe hidden when you reload the spreadsheet. Hidden rows or columns are notprinted by the.I Wcommand..\" ----------.TP.B "sr, sc"Show hidden rows (columns).Enter a range of rows (columns) to be revealed.The default is the first range of rows (columns) currently hidden.This command ignores the repeat count, if any..\" ----------.TP.B fSet the output format to be usedfor printing the numeric values in each cell in the current column.Enter two numbers:the total width in characters of the column,and the number of digits to follow decimal points.Values are rounded off to the least significant digit displayed.The total column width affects displays of strings as well as numbers.A preceding count can be used to affect more than one column.This command has only a column version (no second letter)..\" ==========.SS "Range Commands".\" ----------Range operations affect a rectangular region on the screendefined by the upper left and lower right cells in the region.All of the commands in this class start with a slash;the second letter of the command indicates which command.A small menu lists the choices for the second letter when you type ``/''..I scprompts for needed parameters for each command.Phrases surrounded by square brackets in the prompt are informational onlyand may be erased with the backspace key..\" ----------.PPPrompts requesting variable names may be satisfiedwith either an explicit variable name, such as.IR A10 ,or with a variable name previously defined in a.I /dcommand (see below).Range name prompts require either an explicit range such as.IR A10:B20 ,or a range name previously defined with a.I /dcommand.A default range shown in the second lineis used if you omit the range from the command or press the.SM TABkey (see below).The default range can be changed by moving the cell cursorvia the control commands.RI ( ^P ,.IR ^N ,.IR ^B ,.IR ^F )or the arrow keys.The cells in the default range are highlighted(using the terminal's standout mode, if available)..\" ----------.TP.B /xClear a range.Cells cleared with this command may be recalled with any of the.I pullcommands..\" ----------.TP.B /vValues only.This command removes the expressions from a range of cells,leaving just the values of the expressions..\" ----------.TP.B /cCopy a source range to a destination range.The source and destination may be different sizes.The result is always one or more full copies of the source.Copying a row to a row yields a row.Copying a column to a column yields a column.Copying a range to anything yields a range.Copying a row to a column or a column to a row yields a rangewith as many copies of the source as there are cells in the destination.This command can be used to duplicate a cell through an arbitrary rangeby making the source a single cell range such as.IR b20:b20 ..\" ----------.TP.B /fFill a range with constant valuesstarting with a given value and increasing by a given increment.Each row is filled before moving on to the next row if row orderrecalculation is set. Column order fills each column in the rangebefore moving on to the next column.The start and increment numbers may be positive or negative.To fill all cells with the same value, give an increment of zero..\" ----------.TP.B /dUse this command to assign a symbolic name to a single cellor a rectangular range of cells on the screen.The parameters are the name, surrounded by "",and either a single cell name such as.I A10or a range such as.IR a1:b20 .Names defined in this fashion are used by the program in future prompts,may be entered in response to prompts requesting a cell or range name,and are saved when the spreadsheet is saved with the.I Putcommand.Names defined must be more than two alpha characters longto differentiate them from a column names,and must not have embedded special characters.Names may include the character ``_'' or numeralsas long as they occur after the first three alpha characters..\" ----------.TP.B /sThis command lists (shows) the currently defined range names.If there are no defined range names, then a message is given,otherwiseit pipes output to.IR sort ,then to.IR less .If the environment variable PAGER is set, its value is used in place of.IR less..\" ----------.TP.B /uUse this command to undefine a previously defined range name..\" ==========.SS "Miscellaneous Commands".\" ----------\0 \" exactly one blank line (hard to get).PD 0.TP.B Q.TP.B q.TP.B ^CExit from.IR sc .If you made any changes since the last.I Getor.IR Put ,.I scasks about saving your data before exiting..PD.\" ----------.TP.B ^G.PD 0.TP.B ESCAbort entry of the current command..PD.\" ----------.TP.B ?Enter an interactive help facility. Lets you look up briefsummaries of the main features of the program. The help facility isstructured like this manual page so it is easy to find moreinformation on a particular topic..\" ----------.TP.B !Shell escape..I scprompts for a shell command to run.End the command line with the.SM RETURNkey.If the environment variable.SM SHELLis defined, that shell is run.If not, /bin/sh is used.Giving a null command line starts the shell in interactive mode.A second ``!'' repeats the previous command..\" ----------.TP.B ^LRedraw the screen..\" ----------.TP.B ^RRedraw the screen with special highlighting of cells to be filled in.This is useful for finding values you need to provide or updatein a form with which you aren't familiaror of which you have forgotten the details.It's also useful for checking a form you are creating.All cells which contain constant numeric values(not the result of a numeric expression)are highlighted temporarily,until the next screen change, however minor.To avoid ambiguity,the current range (if any) and current cell are not highlighted..\" ----------.TP.B ^XThis command is similar to.IR ^R ,but highlights cells which have expressions.It also displays the expressions in the highlighted cellsas left-flushed strings,instead of the numeric values and/or label strings of those cells.This command makes it easier to check expressions,at least when they fit in their cells or the following cell(s) are blankso the expressions can slop over (like label strings).In the latter case, the slop over is not cleared on the next screen update,so you may want to type.I ^Lafter the.I ^Xin order to clean up the screen..\" ----------.TP.B @Recalculates the spreadsheet..\" ----------.TP.B ^VType, in the command line, the name of the current cell(the one at the cell cursor).This is useful when entering expressionswhich refer to other cells in the table..\" ----------.TP.B ^WType, in the command line, the expression attached to the current cell.If there is none, the result is ``?''..\" ----------.TP.B ^AType, in the command line, the numeric value of the current cell, if any..\" ----------.PPThe.IR ^V ,.IR ^W ,and.I ^Acommands only work when the character cursoris on the command line and beyond the first character..\" ----------.TP.B TABWhen the character cursor is on the top line,defines a range of cells via the cursor control commands or the arrow keys.The range is highlighted,starts at the cell where you typed.SM TAB,and continues through the current cell cursor.Pressing.SM TABagain causes the highlighted range to be entered into the command lineand the highlighting to be turned off.This is most useful for defining ranges to functions such as.IR @sum ().Pressing ``)'' acts just like typing the.SM TABkey the second time and adds the closing ``)''.Note that when you give a range command,you don't need to press the first.SM TABto begin defining a range starting with the current cell..\" ==========.SS "Variable Names".\" ----------Normally, a variable name is just the name of a cell, such as.IR K20 .The value is the numeric or string value of the cell,according to context..\" ----------.PPWhen a cell's expression (formula) is copied to another location via.I copyor.IR range-copy ,variable references are by default offset by the amount the formula moved.This allows the new formula to work on new data.If cell references are not to change,you can either use the.I fixedoperator (see below),or one of the following variations on the cell name..\" ----------.TP.I K20References cell.IR K20 ;the reference changes when the formula is copied..\" ----------.TP.BI $ K $ 20Always refers to cell.IR K20 ;the reference stays fixed when the formula is copied..\" ----------.TP.BI $ K20Keeps the column fixed at column K;the row is free to vary..\" ----------.TP.IB K $ 20Similarly, this fixes the row and allows the column to vary..\" ----------.PPThese conventions also hold on defined ranges.Range references vary when formulas containing them are copied.If the range is defined with fixed variable references,the references do not change..\" ----------.TP.B fixedTo make a variable not change automatically when a cell moves,put the word.I fixedin front of the reference, for example:B1 \(** fixed C3..\" ==========.SS "Numeric Expressions".\" ----------Numeric expressions used with the ``=''and.I ecommands have a fairly conventional syntax.Terms may beconstants,variable names,parenthesized expressions,and negated terms.Ranges may be operated upon with range functions such as sum.RI ( @sum ())and average.RI ( @avg ()).Terms may be combined using binary operators..\" ----------.TP.BR \- eNegation..\" ----------.TP.RB e + eAddition..\" ----------.TP.RB e \- eSubtraction..\" ----------.TP.RB e \(** eMultiplication..\" ----------.TP.RB e / eDivision..\" ----------.TP.RB e1 % e2e1 mod e2..\" ----------.TP.RB e ^ eExponentiation..\" ----------.TP.RB e < e.PD 0.TP.RB e <= e.TP.RB e = e.TP.RB e != e.TP.RB e >= e.TP.RB e > eRelationals:true (1) if and only if the indicated relation holds,else false (0).Note that ``<='', ``!='', and ``>=''are converted to their ``~()'' equivalents..PD.\" ----------.TP.BR ~ eBoolean operator.SM NOT..\" ----------.TP.RB e & eBoolean operator.SM AND..\" ----------.TP.RB e | eBoolean operator.SM OR..\" ----------.TP.RB @if (e, e, e).PD 0.TP.RB e ? e : eConditional:If the first expression is true then the value of the second is returned,otherwise the value of the third..\" ----------.PPOperator precedence from highest to lowest is:.PP.nf.RS\-, ~^\(**, /+, \-<, <=, =, !=, >=, >&|?:.RE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -