🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1219

<<eof .... eof questions

#1219
From: Johnny Szeto
Date: Sat, 22 Sep 1990 22:18
25 lines
1499 bytes
There is a problem with an interactive shell command I try to use:

[shakyamuni:54 :~] foreach i (*2)
? set g=`sed 's/\(.*\)2/\1/'<<fg
? $r[$b]
? fg`
? mv $i $g
? @ b++
? end
The above paragraph is typed on a current shell since I have to change some 
filenames in the current shell.

On line two by the end of the sentence I try to use a here statement
so that sed will execute the variable $r[$b] as a standard input typed
at the terminal if I use < instead of << thru sed will take the stuff
inside the variable, by the way the variable contains filename so sed
will take everything inside the file as input rather the filename
itself.  But the problem is the command substitution quotes `` has to
be on the same line since when I execute it it says unmatched `.  I
guess the problem is when I go to line 3 the shell gives me another
subshell prompt so it apparently has already execute line 2 before I
complete the `` command.

I am quite a novice in programming C-shell.  Can someone give me some
guidance?
Technical Details
Message-ID: <12127@chaph.usc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!chaph.usc.edu!aludra.usc.edu!szeto

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!chaph.usc.edu!aludra.usc.edu!szeto
From: szeto@aludra.usc.edu (Johnny Szeto)
Newsgroups: comp.unix.shell
Subject: <<eof .... eof questions
Message-ID: <12127@chaph.usc.edu>
Date: 22 Sep 90 22:18:37 GMT
Sender: news@chaph.usc.edu
Distribution: usa
Organization: University of Southern California, Los Angeles, CA
Lines: 25
Nntp-Posting-Host: aludra.usc.edu
Originator: szeto@aludra.usc.edu