⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sf.1

📁 speech signal process tools
💻 1
字号:
.TH sf 1-gsg "Ver 1.8  01/28/88".SH NAMEsf - shell form (form editor to be used in shell scripts).SH SYNOPSIS.B sf[-Hbhmpru] [-o outfile] [formfile].IP -Hdisplay help message.IP -bgenerate Bourne shell script, default is Csh script.IP -hdisplay input field in highlight mode.IP -mdisplay help message automatically for selection fields.IP -oset output file to outfile (if not given, no output).IP -pgenerate perl script, default is Csh script.IP -rdisplay input field in reverse video mode.IP -udisplay input field in underline mode.IP formfilefile contains form layout (default to stdin).SH DESCRIPTION.I Sfis a tool that allows users write shell scripts with elegant formediting user interface.  It reads an input form, displays it on thescreen, and process all the data entry.  At the end of the formfilling session, sf generates a file contains Csh set commands (orBourne shell commands if -b is specified, Perl script if -p isspecified) which is intended to be 'sourced' by Csh (or "." if you useBourne shell, "eval" in perl).  After source operation, all the fieldsin the form will be defined as shell variables and shell script cancontinue after that..PPThe form template may be stored in a file, but the easiest way to usesf is to send it thru stdin so you do not have to have a script fileand a separate form file to do one job..SH FORM DEFINITIONInput field are specified by '~' characters in the form template,therefore, it it not possible to have ~ characters displayed on theform.  If the 1st char of a line is a CTRL L (^L) character, itindicates the end of form layout part and the start of fielddefinition part.  In field definition part, the 1st character on aline will be used as the delimiter of each token on that line.Currently only five tokens are valid:.IP "v="this means the following token string (until the next delimiter oreol) will be used as the symbol to set at shell..IP "d="this means the following token should be used as the default value tostore in the form before form is displayed..IP "s="this means the following string is the selection list with the firstcharacter as the delimiter, the ending delimiter is optional..IP "h="this means the possible help message for selection field, multiple h=is needed. For example, if you have a selection field:.IPs=/find/add/delete/print/quit.IPyou should specify the help message by:.sp.nf	h=find record based on user name	h=add a new record to database	h=delete current user from database	h=print current user record on printer	h=quit this program.fi.IPwhere each h= entry refers to each of the fields in selection list..IP "a="this specifies the possible attributes for the given field whichshould be supplied as parameters, the following characters will berecognized:.RS.IP "a"autotab, when user typed a character at the last position, the fieldediting will be terminated and cursor will move to next field on theform..IP "d"digits only field, any characters not '0' - '9' will not be accepted..IP "b"block field, next/prev block command (ESC N, ESC P) will move cursorto next field with block attribute set. This makes it easier for userto move to the desired 'block' of fields. (not implemented yet).RE.SH COMMANDSField editing commands are designed to be simple.  Sf understandsarrow keys so it can be used easily for non-technical personnel.Field cursor movement keys are Emacs-like with one major difference:there is no insert mode (any volunteer?), character entered willoverwrite existing data.  The following is a list of them:.IP "TAB"Move to next field on the screen. If there are more fields on the currentline, move to the first one to the right of current field.  If there isno more fields, moves to the first field on the following lines..IP "CTRL T"Same as TAB except moves backwards..IP "RETURN or LINEFEED"Terminates the form edit session..IP "up arrow or CTRL P"Moves to the closest fields on the previous lines, wrap around if no more..IP "down arrow or CTRL N"Same as up arrow execpt moves downward instead..IP "left arrow or CTRL B"Moves cursor left on character on the current field..IP "right arrow or CTRL F"Moves cursor right on character on the current field..IP "CTRL E"Moves cursor to the end of last non-blank characters on the current field..IP "CTRL A"Moves cursor to the beginning of the current field..IP "CTRL U"Blanks all the characters from cursor to beginning of the current field..IP "CTRL K"Blanks all the characters from cursor to the end of the current field..IP "CTRL W"Blanks the previous word before cusor on the current field..IP "CTRL L"Redisplay the form..IP "CTRL Z"(Or whatever your stop key is) Stop sf..IP "CTRL C"(Or whatever your interrupt key is) Aborts the form editing session,sf will display a message and terminate..SH EXAMPLEThe following is an example of how to use it (C shell script):.PP.nf#! /bin/csh -fset srcfile = "/tmp/form.$$"sf -o ${srcfile} -u << sf_eof	     General Systems Group Fast Printer Spooler   File Name: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	[-#] Number of copies:	~~~	      [-h] Burst Header Page: ~~~	[-m] Send mail on completion: ~~~     [-p] Format with pr:    ~~~	[-J] Job Name:		~~~~~~~~~~~~~	[-C] Class Name:	~~~~~~~~~~~~~	[-T] Title for pr:	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~		    Current Print Queue Status`lpq | head -5`	[Press TAB to move to next field, RETURN to execute]@v=fn@d=$*@@v=copy@d=1@a=d@v=burst@s=/Yes/No@@v=mail@s=/No/Yes@v=pr@s=/Yes/No@@v=job@d=$1@@v=class@d=`hostname`@@v=title@d=$1@sf_eofif ( ! -e ${srcfile} ) goto endsource ${srcfile}set copy burst pr mail tf cf jfif ( "${copy}" != "1" ) set copy = "-#${copy}"if ( "${burst}" != "Yes" ) set burst = "-h"if ( "${pr}" == "Yes" ) set pr = "-p"if ( "${mail}" == "Yes" ) set mail = "-m"if ( "${title}" != "" ) set tf = "-T"if ( "${class}" != "" ) set cf = "-C"if ( "${job}" != "" ) set jf = "-J"if ( "${fn}" != "" ) then	lpr ${copy} ${burst} ${pr} ${mail} ${tf} "${title}" \	${cf} "${class}" ${jf} "${job}" ${fn}	endif/bin/rm -f ${srcfile}end:.nf.fi.SH AUTHORPaul Lew.brGeneral Systems Group, Salem NH.SH BUGSThis version of sf comes from my previous work on IBM-PC for my friends andit is rather primitive.  Form editor itself may be improved comments arewelcome.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -