HP3000-L Archives

October 2001, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Mark Bixby <[log in to unmask]>
Date:
Thu, 25 Oct 2001 14:58:53 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (45 lines)
Donna Garverick wrote:
>
> "Porter, Allen H" wrote:
>
> > OK, I know I could do this easily with QEdit, but I'm wondering if there is
> > a straight MPE way.
>
> (hehehe)
>
> > What I want is to be able to do a listf and have the result returned to a
> > system variable as a delimited string.
> > For example, if I do a listf I get the following
> > FILENAME
> >
> > A           B           C           D           E           F
> > G           H           I
> >
> > I would like to create a variable that would look like:
> > 'a,b,c,d,e,f,g,h,i'
>
> <put on my super scripting cape!>   (hehehe)
>
> try this.....  (i call it 'string')

...CI example snipped...

:-) Here's the POSIX shell version:

INVENT3K:/BIXBY/PUB$ var=$(ls | tr "\n" ',' | sed -e s/.$//)
INVENT3K:/BIXBY/PUB$ echo $var
ABLDINTX,ACSUMCAT,ACSUMHLP,ACSUMLED,ALKEDCAT,ALKEDHLP,AUTOCM,AUTOLED,AUTOSPTH,BA
RBARA,BOTH,CALLER,ESTREAM,FOOBAR,GETENV.c,GETENVC,GETENVCO,GETENVM,GETENVP,GETEN
VP2,JOB1,JOB2,MYSETVAR,PATCH000,PATCHIX,PATCHVT,REALFILE,SOCK0674,SOCK0705,UDCSE
TVR,a.out,agree.txt,barb.txt,bash,bic.zip,bin,bugs,chargen,data.txt,dead.letter,
demo,etc,foobar,fwtest,include,info,invent3k.crt,junk,kentest,lib,libexec,makeso
cksxl,man,map.db,map.txt,mbox,public_html,sendbounce,sendbouncelocal,sendfile,se
ndlocal,sendprog,sendprog.out,sendtest,share,snow.html,src,tcpdump.nomad,try.mpe
,trysftp,tster,tt$a,tt`a,vactest,wgetnh,wgettst
--
[log in to unmask]
Remainder of .sig suppressed to conserve scarce California electrons...

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2