📄 part01
字号:
echo shar: 26 control characters may be missing from "'Print'"if test 2591 -ne "`wc -c < 'Print'`"then echo shar: error transmitting "'Print'" '(should have been 2591 characters)'fichmod +x 'Print'fi # end of overwriting checkecho shar: extracting "'Stty'" '(10025 characters)'if test -f 'Stty'then echo shar: will not over-write existing file "'Stty'"elsesed 's/^X//' << \SHAR_EOF > 'Stty'X#! /bin/shX#X#- Stty - stty with form interfaceX#-X#- This program allows user to view all the terminal parametersX#- and change them by form. Help messages has been added to eachX#- field to make change parameter easier.X#X# Author: Paul Lew, General Systems Group, Salem, NHX# Created at: 01/09/88 07:40 PMX# Last update: 01/12/88 10:34 PM (Edition: 79)X#X#---------------------------------------------------------------#X# Get current tty setting and store as shell variables #X#---------------------------------------------------------------#Xsttyfile="/tmp/stty$$"Xtmpfile="/tmp/sttytmp$$"Xtrap "trap '' 0 1 2 3 15; \X /bin/rm -f $sttyfile $tmpfile; \X exit" 0 1 2 3 15Xstty everything 2> $sttyfileXtr -d ':()' < $sttyfile | awk \X'BEGIN { q= 39; fmt = sprintf "%%s=%c%%s%c\n", q, q; } \X NR == 1 { \X printf fmt, "tt_tty", $1; \X printf fmt, "tt_speed", $4; \X printf fmt, "tt_row", $6; \X printf fmt, "tt_column", $8; \X } \X 2 <= NR && NR <= 5 { \X for (i=1; i<=NF; i++) { \X if (substr($(i),1,1)=="-") { \X yon = "No"; \X name = substr($(i),2,99); \X } \X else { \X yon = "Yes"; \X name = $(i); \X } \X print "tt_" name "=" yon; \X } \X } \X NR == 7 { \X printf fmt, "tt_erase", $1; \X printf fmt, "tt_kill", $2; \X printf fmt, "tt_werase", $3; \X printf fmt, "tt_rprnt", $4; \X printf fmt, "tt_flush", $5; \X printf fmt, "tt_lnext", $6; \X n = split ($7, part, "/"); \X printf fmt, "tt_susp", part[1]; \X printf fmt, "tt_suspo", part[2]; \X printf fmt, "tt_intr", $8; \X printf fmt, "tt_quit", $9; \X n = split ($10, part, "/"); \X printf fmt, "tt_stop", part[1]; \X printf fmt, "tt_start", part[2]; \X printf fmt, "tt_eof", $11; \X }' > $tmpfileX#---------------------------------------------------------------#X# Prepare variable for sf to display #X#---------------------------------------------------------------#X. $tmpfileX/bin/rm -f $tmpfileXif [ $tt_raw = "Yes" ]; then tt_mode="raw"Xelif [ $tt_cbreak = "Yes" ]; then tt_mode="cbreak"Xelse tt_mode="cooked"XfiXif [ $tt_nl = "Yes" ]; then tt_nl="No"; else tt_nl="Yes"; fiXif [ $tt_litout = "Yes" ]; then tt_litout="No"; else tt_litout="Yes"; fiXif [ $tt_nohang = "Yes" ]; then tt_nohang="No"; else tt_nohang="Yes"; fiX#---------------------------------------------------------------#X# Invoke sf to allow user make changes #X#---------------------------------------------------------------#Xs=s=/Yes/NoXsf -o $tmpfile -bmu << sf_eofX ***** Terminal Setting for BSD 4.3 System *****XXtty discipline: ~~~~ speed: ~~~~~ Rows: ~~~ Columns: ~~~XXAccept even parity input: ~~~ Mode: ~~~~~~ Treat CR as NL: ~~~XAccept odd parity input: ~~~ Input Echo: ~~~ Map upper to lower: ~~~XFlow control enable: ~~~ Print Tabs: ~~~XXNew TTY Discipline Specific:X Echo BS on erase char: ~~~ Wipe out erased char: ~~~ X Echo CTRL char as ^x: ~~~ Wipe out erased line: ~~~X Background job stop if output: ~~~ Convert tilde: ~~~ Flush output: ~~~X Start/Stop output on carrier transition: ~~~ Output processing: ~~~X Pass 8th bit: ~~~ Hang up if carrier drop: ~~~X Input Pending: ~~~ only XON resume output: ~~~XXTerminal characters:X char erase: ~~ reprint current line: ~~ literal next char: ~~X word erase: ~~ flush output: ~~X line erase: ~~ end of file: ~~X interrupt: ~~ suspend current job: ~~ stop host output (XOFF): ~~X quit: ~~ suspend with output: ~~ start host output (XON): ~~XX.v=tt_discipline.d=new.s=/new/net/old.X.h=Berkeley new tty driver.X.h=net discipline, for communication purpose.X.h=old tty driver from V7 Unix.XX.v=tt_speed.d=$tt_speed.X.s=/0/50/75/110/134/150/200/300/600/1200/1800/2400/4800/9600/exta/extb.X.h=hang up phone line immdeidately.X.h=50.h=75.h=110.h=134.h=150.h=200.h=300.h=600.h=1200.h=1800.h=2400.h=4800.X.h=9600.h=exta (19200 on DH-11 board).h=extb (not implemented yet).XX.v=tt_row.d=$tt_row.v=tt_column.d=$tt_column.XX.v=tt_even.d=$tt_even.$s.X.h=Strip parity bit for even parity input char.X.h=Throw away even parity input char.XX.v=tt_mode.d=$tt_mode.s=/cooked/cbreak/raw.X.h=Cooked mode - with input editing, end by newline.X.h=Cbreak mode - return char as it typed except interrupt, flow control.X.h=Raw mode - return every char as it typed.XX.v=tt_nl.d=$tt_nl.$s.X.h=Allow CR for NL, and output CR-LF for CR or NL.X.h=Accept only newline to end lines.XX.v=tt_odd.d=$tt_odd.$s.X.h=Strip parity bit for odd parity input char.X.h=Throw away odd parity input char.XX.v=tt_echo.d=$tt_echo.$s.X.h=Echo back every character typed.X.h=Do not echo characters, good for Emacs inferior shell.XX.v=tt_lcase.d=$tt_lcase.$s.X.h=This is for terminal that do not have lowercase letter.X.h=This is for modern day terminal.XX.v=tt_tandem.d=$tt_tandem.$s.X.h=system sends out stop/start char when queue is near overflow/empty.X.h=Application program have to handle XON/OFF.XX.v=tt_tabs.d=$tt_tabs.$s.X.h=Preserve tabs when printing.X.h=Replace tabs by spaces when printing (for terminal with no hardware tabs).XX.v=tt_crtbs.d=$tt_crtbs.$s.X.h=Echo backspaces on erase characters, useful for CRT.X.h=do not echo backspaces on erase characters, useful for hardcopy terminals.XX.v=tt_crterase.d=$tt_crterase.$s.X.h=Wipe out erased characters with backspace-space-backspace.X.h=Echo erased characters backwards within \\ and /.XX.v=tt_ctlecho.d=$tt_ctlecho.$s.X.h=Delete will be ^?, print two BS following the EOT char (CTRL D).X.h=CTRL char echo as themselves; in cooked mode EOT (CTRL-D) is not echoed.XX.v=tt_crtkill.d=$tt_crtkill.$s.X.h=Wipe out input on like kill ala crterase.X.h=Just echo line kill character and a newline on line kill.XX.v=tt_tostop.d=$tt_tostop.$s.X.h=Background jobs stop if they attempt terminal output.X.h=Output from background jobs to the terminal is allowed.XX.v=tt_tilde.d=$tt_tilde.$s.X.h=Convert ~ to \` on output (for Hazeltine terminals).X.h=Leave poor ~ char alone.XX.v=tt_flusho.d=$tt_flusho.$s.X.h=Output is being discarded usually because user hit CTRL O.X.h=Output is not being discarded.XX.v=tt_mdmbuf.d=$tt_mdmbuf.$s.X.h=Start/stop output on carrier transitions.X.h=Return error if write attempted after carrier drops.XX.v=tt_litout.d=$tt_litout.$s.X.h=Do normal output processing, inserting delays, etc.X.h=Send output characters without any processing.XX.v=tt_pass8.d=$tt_pass8.$s.X.h=pass 8th bit.X.h=strip off 8th bit.XX.v=tt_nohang.d=$tt_nohang.$s.X.h=Send hangup signal to control process group when carrier drops.X.h=Do not send hangup signal if carrier drops.XX.v=tt_pendin.d=$tt_pendin.$s.X.h=Input is pending after a switch from cbreak to cooked.X.h=Input is not pending.XX.v=tt_decctlq.d=$tt_decctlq.$s.X.h=This is compatible with DEC vendor supplied systems.X.h=After output is suspended, any char will restart it.XX.v=tt_erase.d=$tt_erase.v=tt_rprnt.d=$tt_rprnt.v=tt_lnext.d=$tt_lnext.X.v=tt_werase.d=$tt_werase.v=tt_flush.d=$tt_flush.X.v=tt_kill.d=$tt_kill.v=tt_eof.d=$tt_eof.X.v=tt_intr.d=$tt_intr.v=tt_susp.d=$tt_susp.v=tt_stop.d=$tt_stop.X.v=tt_quit.d=$tt_quit.v=tt_suspo.d=$tt_suspo.v=tt_start.d=$tt_start.Xsf_eofX#---------------------------------------------------------------#X# Process variable returned #X#---------------------------------------------------------------#X. $tmpfileX/bin/rm -f $tmpfile $sttyfileXtt_even=`[ $tt_even = "Yes" ] || echo -`evenXcase $tt_mode inX cooked) tt_raw='-raw'; tt_cbreak='-cbreak';;X cbreak) tt_raw='-raw'; tt_cbreak='cbreak';;X raw) tt_raw='raw'; tt_cbreak='-cbreak';;X esacXtt_nl=`[ $tt_nl = "No" ] || echo -`nlXtt_odd=`[ $tt_odd = "Yes" ] || echo -`oddXtt_echo=`[ $tt_echo = "Yes" ] || echo -`echoXtt_lcase=`[ $tt_lcase = "Yes" ] || echo -`lcaseXtt_tandem=`[ $tt_tandem = "Yes" ] || echo -`tandemXtt_tabs=`[ $tt_tabs = "Yes" ] || echo -`tabsXtt_crtbs=`[ $tt_crtbs = "Yes" ] || echo -`crtbsXtt_crterase=`[ $tt_crterase = "Yes" ] || echo -`crteraseXtt_ctlecho=`[ $tt_ctlecho = "Yes" ] || echo -`ctlechoXtt_crtkill=`[ $tt_crtkill = "Yes" ] || echo -`crtkillXtt_tostop=`[ $tt_tostop = "Yes" ] || echo -`tostopXtt_tilde=`[ $tt_tilde = "Yes" ] || echo -`tildeXtt_flusho=`[ $tt_flusho = "Yes" ] || echo -`flushoXtt_mdmbuf=`[ $tt_mdmbuf = "Yes" ] || echo -`mdmbufXtt_litout=`[ $tt_litout = "No" ] || echo -`litoutXtt_pass8=`[ $tt_pass8 = "Yes" ] || echo -`pass8Xtt_nohang=`[ $tt_nohang = "No" ] || echo -`nohangXtt_pendin=`[ $tt_pendin = "Yes" ] || echo -`pendinXtt_decctlq=`[ $tt_decctlq = "Yes" ] || echo -`decctlqXtt_noflsh=`[ $tt_noflsh = "Yes" ] || echo -`noflshX#---------------------------------------------------------------#X# Output stty command to file (or stdout if no arg) #X#---------------------------------------------------------------#Xif [ "$1" = "" ]; thenX sttyfile=/dev/ttyXelseX sttyfile="$1"X fiXcat > $sttyfile << cat_eofXset noglobXstty $tt_discipline speed $tt_speed \\X $tt_even $tt_odd $tt_raw $tt_nl $tt_echo $tt_lcase \\X $tt_tandem $tt_tabs $tt_cbreak \\X $tt_crtbs $tt_crterase $tt_crtkill $tt_ctlecho $tt_tostop \\X $tt_tilde $tt_flusho $tt_mdmbuf $tt_litout $tt_pass8 \\X $tt_nohang $tt_pendin $tt_decctlq $tt_noflsh \\X erase "$tt_erase" rprnt "$tt_rprnt" lnext "$tt_lnext" \\X werase "$tt_werase" flush "$tt_flush" \\X kill "$tt_kill" eof "$tt_eof" \\X intr "$tt_intr" susp "$tt_suspd" stop "$tt_stop" \\X quit "$tt_quit" susp "$tt_suspd" start "$tt_start"Xunset noglobXcat_eofX#X# 1) new tty, speed 1200 baud, 24 rows, 80 columnsX# 2) even odd -raw -nl echo -lcase -tandem tabs -cbreak X# 3) crt: (crtbs crterase crtkill ctlecho) -tostop X# 4) -tilde -flusho -mdmbuf -litout -pass8 -nohang X# 5) -pendin decctlq -noflsh X# 6) erase kill werase rprnt flush lnext susp intr quit stop eofX# 7) ^? ^U ^W ^R ^O ^V ^Z/^Y ^C ^\ ^S/^Q ^DX# 1 2 3 4 5 6 7 8 9 10 11SHAR_EOFif test 10025 -ne "`wc -c < 'Stty'`"then echo shar: error transmitting "'Stty'" '(should have been 10025 characters)'fichmod +x 'Stty'fi # end of overwriting checkecho shar: extracting "'Lib'" '(8749 characters)'if test -f 'Lib'then echo shar: will not over-write existing file "'Lib'"elsesed 's/^X//' << \SHAR_EOF > 'Lib'X#! /bin/csh -fX#X#- gsglib - GSG library on-line queryX#-X# Author: Paul Lew, General Systems Group, Inc.X# Created at: 08/15/86 04:18 PMX# Last update: 01/26/88 12:31 PM (Edition: 8)X#X#- Usage: gsglib <CR>X#X#---------------------------------------------------------------#X# Display help if requested by user #X#---------------------------------------------------------------#Xswitch ( "$1" )X case -H[xX]:X set echo; set verbose; shiftX breakswX case -H*:X show_help `which $0` $1X goto endX default:X endswX#---------------------------------------------------------------#X# Process Arguments #X#---------------------------------------------------------------#Xset libfile = '/gsg/lew/dat/gsglib.dat'Xset tmpfile = "/tmp/gsglib.$$"Xunsetenv LESSX#---------------------------------------------------------------#X# Display main menu and get user input (use sf) #X#---------------------------------------------------------------#Xloop:Xset srcfile = "/tmp/gsglib$$"Xsf -o ${srcfile} -u << sf_eofX General Systems Group Library DirectoryXX Operation: ~~~~~~~ [choice: find add new print keyword help quit]XXX Book number: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~X ~~~ Keyword: ~~~~~~~~~~~~~~~X ~~~ Author: ~~~~~~~~~~~~~~~~~~~~~~~~X ~~~ Title: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~X ~~~ Date published: ~~~~~~~~~~~~~X ~~~ Publisher: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~X ~~~ Book id: ~~~~~~~~~~~~~~~~~~~~~~~X ~~~ Number of pages:~~~~~XX ^X +------ enter "y" to include in the output listXX [Press TAB to move to next field, RETURN to execute]XX.v=opcode.s=/find/add/new/print/keyword/help/quit.X.h=find out what books has the data we want.X.h=add new books to library.X.h=see what are the new books since last use.X.h=print out previous output to printer.X.h=display all the predefined keywords that are valid for keyword search field.X.h=display help message about how to use this program.X.h=quit, exit back to Unix.X.v=bookno.X.v=selkw.s=/No/Yes.v=keyword.X.v=selau.s=/Yes/No.v=author.X.v=selti.s=/Yes/No.v=title.X.v=selpd.s=/Yes/No.v=pdate.X.v=selpu.s=/Yes/No.v=pub.X.v=selbi.s=/No/Yes.v=bookid.X.v=selsz.s=/No/Yes.v=size.Xsf_eofX#---------------------------------------------------------------#X# Get symbol defined for the current process #X#---------------------------------------------------------------#Xif ( ! -e ${srcfile} ) goto endXsource ${srcfile}X/bin/rm -f ${srcfile}X#---------------------------------------------------------------#X# Execute user request #X#---------------------------------------------------------------#X#echo "author=[${author}] output select=[${selau}]"X#echo "keyword=[${keyword}] output select=[${selkw}]"X#echo "title=[${title}] output select=[${selti}]"X#echo "pdate=[${pdate}] output select=[${selpd}]"X#echo "pub=[${pub}] output select=[${selpu}]"X#echo "press return: "X#set yon = "$<"Xif ( "${bookno}" == "vi" ) thenX goto libviX endifXswitch ( "${opcode}" )X case "find":X goto libfindX case "add":X goto libaddX case "new":X goto libnewX case "print":X goto libprintX case "keyword":X goto libkeywordX case "help":X goto libhelpX case "quit":X goto endX default:X echo "Unknown command: ${opcode}"X sleep 2X goto loopX breakswX endswX#---------------------------------------------------------------#X# add a new record to library file #X#---------------------------------------------------------------#Xlibfind:X cat /dev/null > ${tmpfile}X set outselX if ( "${selkw}" == "Yes" ) set outsel = "${outsel}K"X if ( "${selau}" == "Yes" ) set outsel = "${outsel}A"X if ( "${selti}" == "Yes" ) set outsel = "${outsel}T"X if ( "${selpd}" == "Yes" ) set outsel = "${outsel}D"X if ( "${selpu}" == "Yes" ) set outsel = "${outsel}P"X if ( "${selbi}" == "Yes" ) set outsel = "${outsel}N"X if ( "${selsz}" == "Yes" ) set outsel = "${outsel}S"X if ( "${outsel}" == "" ) thenX echo -n "No output selection"X goto getretX endifX if ( "${bookno}" != "" ) thenX set recno = (${bookno})X goto grepnoX endifX if ( "${keyword}" != "" ) thenX grep '^#K' ${libfile} | grep -i "${keyword}" >> ${tmpfile}X endifX if ( "${author}" != "" ) thenX grep '^#A' ${libfile} | grep -i "${author}" >> ${tmpfile}X endifX if ( "${title}" != "" ) thenX grep '^#T' ${libfile} | grep -i "${title}" >> ${tmpfile}X endifX if ( "${pdate}" != "" ) thenX grep '^#D' ${libfile} | grep -i "${pdate}" >> ${tmpfile}X endifX if ( "${pub}" != "" ) thenX grep '^#P' ${libfile} | grep -i "${pub}" >> ${tmpfile}X endifX if ( "${bookid}" != "" ) thenX grep '^#N' ${libfile} | grep -i "${bookid}" >> ${tmpfile}X endifX if ( "${size}" != "" ) thenX grep '^#S' ${libfile} | grep -i "${size}" >> ${tmpfile}X endifX if ( -z ${tmpfile} ) thenX echo -n "No related information"X goto getretX else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -