🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #2402

Re: Problems specifying regexps when shelling out of trn

#2402
From: Sridhar Venkataraman
Date: Mon, 26 Oct 1992 01:16
77 lines
3117 bytes
twpierce@unix.amherst.edu (Tim Pierce)
writes on news.software.readers:

)I've run into an odd problem when forking a new shell from trn with
)the "!" command.  If I attempt to specify certain regular expressions
)in the shell command, for example "grep '^comp' /usr/lib/news/active",
)I get no output whatsoever.  Apparently the regexp is being munged
)before the command has a chance to be executed.  I've tried "^comp"
)surrounded by single quotes, double quotes, and neither.  I don't have
)any problems using $ or other metacharacters.

[n.n.q mode on]

Ok, what is the shell you are running? :-)

[n.n.q mode off]

My setup involves sh, csh (4.3 BSD tahoe) tcsh  (6.00.02) and trn
(2.2).

Take your pick...

Sridhar.
---script from a session follows ....

****   2 in asu.acm--read? [+ynq] &&w !grep %"Pattern: " /tmp/rrnact.%$

****   2 in asu.acm--read? [+ynq] &&

Macros:
w       !grep %"Pattern: " /tmp/rrnact.%$

****   2 in asu.acm--read? [+ynq] &-ESHELL=/bin/sh

****   2 in asu.acm--read? [+ynq] Pattern: \^asu.ac
!grep \^asu.ac /tmp/rrnact.3312
/bin/sh: asu.ac: not found
grep: usage: grep [-bchilnosvwy] [-e] pattern [file ...]

****   2 in asu.acm--read? [+ynq] Pattern: '^asu.ac'
!grep '^asu.ac' /tmp/rrnact.3312

****   2 in asu.acm--read? [+ynq] Pattern: '\^asu.ac'
!grep '\^asu.ac' /tmp/rrnact.3312
asu.acm 000000002 00001 y

****   2 in asu.acm--read? [+ynq] &-ESHELL=/bin/csh

****   2 in asu.acm--read? [+ynq] Pattern: ^asu.ac
!grep ^asu.ac /tmp/rrnact.3312

****   2 in asu.acm--read? [+ynq] Pattern: \^asu.ac
!grep \^asu.ac /tmp/rrnact.3312
asu.acm 000000002 00001 y

****   2 in asu.acm--read? [+ynq] Pattern: '^asu.ac'^H
!grep '^asu.ac' /tmp/rrnact.3312

****   2 in asu.acm--read? [+ynq] &-ESHELL=/usr/local/bin/tcsh

****   2 in asu.acm--read? [+ynq] Pattern: ^asu.ac
!grep ^asu.ac /tmp/rrnact.3312

****   2 in asu.acm--read? [+ynq] Pattern: \^asu.ac
!grep \^asu.ac /tmp/rrnact.3312
asu.acm 000000002 00001 y

****   2 in asu.acm--read? [+ynq] Pattern: '\^asu.ac'
!grep '\^asu.ac' /tmp/rrnact.3312
asu.acm 000000002 00001 y

****   2 in asu.acm--read? [+ynq] Pattern: \'\^asu.ac\'
!grep \'\^asu.ac\' /tmp/rrnact.3312
asu.acm 000000002 00001 y

--
Sridhar Venkataraman			sridhar@asuvax.eas.asu.edu
Technical Details
Message-ID: <1992Oct26.011624.4983@ennews.eas.asu.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!sparky!uunet!usc!wupost!zaphod.mps.ohio-state.edu!cs.utexas.edu!asuvax!ennews!enuxhb.eas.asu.edu!sridhar
References: <BwoyGv.78@unix.amherst.edu>

Show Full Headers
Complete Article Headers
Message-ID: <1992Oct26.011624.4983@ennews.eas.asu.edu>
Subject: Re: Problems specifying regexps when shelling out of trn
Date: Mon, 26 Oct 1992 01:16:24 GMT
From: sridhar@enuxhb.eas.asu.edu (Sridhar Venkataraman)
References: <BwoyGv.78@unix.amherst.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!sparky!uunet!usc!wupost!zaphod.mps.ohio-state.edu!cs.utexas.edu!asuvax!ennews!enuxhb.eas.asu.edu!sridhar
Newsgroups: news.software.readers
Sender: news@ennews.eas.asu.edu (USENET News System)
Reply-To: sridhar@homecheese.var.asu.edu (Sridhar Venkataraman)
Organization: Arizona State University, Tempe AZ
Lines: 77