lori@hacgate.UUCP (Lori Barfield) (12/06/89)
Now that I'm a sysadmin on Unix systems instead of an Aegis net, I'm not sure what to do with those oh-so-handy shellscripts I used to depend on. Before I throw them out forever, thought I'd throw one on the net and see if anyone is interested in spending bandwidth on sharing Aegis scripts in this forum. All of my Aegis stuff was written on SR9; better ways may exist now. This script searches a dir for a string, ignoring .bin and .bak files, defaulting to current dir. ---------------------------------- cut here --------------------------------- ############################################################################## # TITLE : pat # # ARG 1 : (required, prompted with omission) pattern to find in non-.BAK # # ASCII files in current directory # # ARG 2 : (optional) directory to search # # ARG 3 : (optional) std FPAT list option (such as -LF or -LM) # # METHOD: scans current (or given) dir for non-.BAK ASCII files, calls FPAT # # AUTHOR: Lori Barfield # # REV. : 3-31-89 # ############################################################################## # # *** set up shell # eon # # *** variables # frag := ''; files := ''; file := ''; junk := ''; listop := ''; ch1 := ''; line := ''; # # *** parameters # if eqs ^1 then read -p 'Enter fragment: ' frag else frag := ^1 endif if eqs ^2 then files := './?*' else files := "^2/?*" endif if eqs ^3 then listop := '-lm' else listop := ^3 endif # # *** execution # /com/ld ^files -nhd -c -lf -ab | /com/fpat -x '.bak' 'bin' | @ while readln line do for ch1 in ^line by char exit endfor # sift out mailboxes and whatever if ((^ch1 <> ' ')) then args ^line | read junk file /com/fpat ^listop -l -i -rmf 20 ^file -p ^frag endif enddo
lori@hacgate.UUCP (Lori Barfield) (12/06/89)
In article <6354@hacgate.UUCP> lori@hacgate.UUCP (Lori Barfield) writes: >All of my Aegis stuff was written on SR9; better ways may exist now. Here's another that I get asked for sometimes, my version of "phone" for DMs. It takes advantage of an ASCII registry file to convert human names to user ids-- very simple to edit that out if you don't have one. Works on user ids, node numbers, or their fragments. Handy for putting a large message window on a DM with no one currently logged in. (alarm_servers are usually set up only when a user is logged on a node.) ------------------------------------ cut here ------------------------------- # "talk" # creates input-echo pad on display manager currently in use by given person # 1 arg: user name (human or logon) or fragment of same --OR-- # '-n nodenumber' # eon # # "constants" # registry := '/tss/com/registry_list' # # variables # logonID := ''; node_spec := ''; node := ''; num_matches := 0; talk_to_node := false; # # # get argument: user name fragment or node id # if eqs ^1 then /com/args '' 'You forgot to supply recipient. Assuming root.' '' recpnt := 'root' else if eqs ^1 '-n' then node := ^2 talk_to_node := true else recpnt := ^1 endif endif endif # # # talk directly to node # # count node matches; handle errors # if ((^talk_to_node)) then /com/lcnode -b -id | /com/fpat -i -c -rm 2 ^node | read num_matches if ((^num_matches < 1)) then /com/args '' 'No matching node number found in ring.' '' else if ((^num_matches > 1)) then /com/args '' 'Node number fragment not unique in ring.' '' else /com/lcnode -b -id | /com/fpat -i ^node | read node /com/crp /com/crpad -on ^node -me endif endif # # # talk to given user # # count user name matches; handle errors # else /com/fpat -i -c -rm 2 ^registry -p ^recpnt | read num_matches if ((^num_matches < 1)) then /com/args '' 'Recipient name fragment not found in user registry.' '' else if ((^num_matches > 1)) then /com/args '' 'Recipient name fragment not unique in user registry.' '' else # # have logon name; find node logged in to; handle error # /com/fpat -i ^registry -p ^recpnt | read logonID node_spec := ^"/com/lusr | /com/fpat ^logonID"-'*** diskless'-^logonID if eqs ((^node_spec)) then /com/args '' 'Recipient not logged in to a Display Manager.' '' else for node in ^node_spec by word; exit; endfor # 1st word is node /com/crp /com/crpad -on ^node -me endif endif endif endif
lori@hacgate.scg.hac.com (Lori Barfield) (12/21/89)
At the group where I used to work, we used Danford's FSE (Full Screen Edit) program to emulate the DM on VT100 terminals talking to Apollos over SIO lines. (This is a very cost-effective way to expand your net if you have users who don't require graphics applications all the time.) Our users usually named files with common extensions, like '.ftn', '.lis', '.out', etc. Why type the extension if you can have a shellscript smart enough to find the file you are looking for in less time than the typing would take? Also, it's a small thing, but this editor didn't prompt for creation of a new file; so in case of typos, you had to sit and wait for the empty file to come up, then exit. Annoying on a serial line; this was the fix. ---------------------------------- cut here ---------------------------- # E # enhanced call to serial line editor (see variable below) # # takes up to 2 args # if both args entered, 1st must be file name, 2nd must be -termtype # single argument can be either file name or -termtype # if term type ommitted, sends editor the default param (see var below) # # extension handling # if file name taken literally is nonexistent (or not ascii), looks for # file name + common suffixes (see list below for hierarchy) # # new file handling # if given file and all file.suff don't exist, prompts for creation # of new file ############################################################################# # eon # #=========================== CONSTANTS TO MODIFY ========================== editor := '/com/fse' def_term := '-vt100' suff_list := '.pas .ddl .ftn .ins.pas .ins.ftn _maint.pas _rpt.pas ' + @ '.lst .jcf .jlf .fmt .rpt .rdl .dat .c .ins.c' #============================================================================ # dash := '-'; file := ''; trm := ''; p1 := ''; fnd := true; type := '' args '' # if not eqs ^1; then # {assign 1st arg to correct var} p1 := ^1; for lett in ^p1 by char; exit; endfor if ((^lett = ^dash)) then trm := ^p1 else file := ^p1 endif # if not eqs ^file; then if existf ^file then # {check file type} /com/ld ^file -ab -nhd | read -type string type if (( ^type <> 'asc' )) then fnd := false endif else fnd := false endif # if ((not ^fnd)) then # {check for file + suffixes} for suff in ^suff_list by word if existf ^file^suff then file := ^file^suff fnd := true exit endif endfor endif # if ((not ^fnd)) then # {prompt for creation of new file} read -prompt "Create ^1? " -type string ans; args '' for yes in 'y Y yes YES Yes' by word if ((^ans = ^yes)) then fnd := true; exit endif endfor endif endif endif # if ((^fnd)) then # {set default terminal if necessary} if eqs ^2; then if ((^trm = '')) then trm := ^def_term endif else trm := ^2 endif # if eqs ^file; then # {can't call editor w/nul param; omit} /com/fse ^trm else ^editor ^file ^trm endif endif
jshoj@EARTH.LERC.NASA.GOV ("Jeffery Hojnicki") (01/09/90)
In article: <6527@hacgate.scg.hac.com> lori writes >At the group where I used to work, we used Danford's FSE (Full Screen Edit) >program to emulate the DM on VT100 terminals talking to Apollos over >SIO lines. Will this program (FSE) also work on, say, a PC emulating a VT100 logged in via telnet. If so, can someone provide me information on this editor program (ie. How well does it work, how much is it, what does it run under, where can I get it from, etc.) Thanks in advance, Jeff Hojnicki My opinions are not those of NASA. NASA LeRC JSHOJ@earth.lerc.nasa.gov
lampi@pnet02.gryphon.com (Michael Lampi) (01/10/90)
>In article: <6527@hacgate.scg.hac.com> lori writes > >>At the group where I used to work, we used Danford's FSE (Full Screen Edit) >>program to emulate the DM on VT100 terminals talking to Apollos over >>SIO lines. > >Will this program (FSE) also work on, say, a PC emulating a VT100 logged in >via telnet. If so, can someone provide me information on this editor program >(ie. How well does it work, how much is it, what does it run under, where can >I get it from, etc.) Well, from my experience FSE will work on a PC emulating a VT100 logged in via telnet, but you probably will have to specify the -vt100 option when starting FSE. The program has very few bugs (generally speaking, none that really matter), it's been around since 1982 (but has been greatly improved and expanded upon since then), runs under Aegis (but will work under *nix). You can get Danford's FSE from Danford Corp. (213) 514-9334 for somewhere in the neighborhood of $1K. My relationship with Danford? I USED to work there--they no longer required my services. My relationship with FSE? I wrote it. An alternate program is offered by Eurosoft, Inc. out of New Hampshire. Don't have their telephone number, but the company distributes a program produced by some folks in the U.K. Don't have too much experience with it, but it looks like it has much of what FSE has and offers transcript pads as well. Price? In the same neighborhood as FSE. Michael Lampi MDL Corporation 213/782-7888 fax 213/782-7927 UUCP: {ames!elroy, <routing site>}!gryphon!pnet02!lampi INET: lampi@pnet02.gryphon.com "My opinions are that of my corporation!"
lori@hacgate.scg.hac.com (Lori Barfield) (01/11/90)
In article <24509@gryphon.COM> lampi@pnet02.gryphon.com (Michael Lampi) writes: > My relationship with FSE? I wrote it. Well, in *that* case, I take back everything I said. ...lori ;-)