Subject: | |
From: | |
Reply To: | |
Date: | Thu, 6 Jul 2000 14:30:33 +0200 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Chuck,
>I need a way to easily move an entire group of MPE text files to a posix
>directory in bytestream format, and then back again at a later time.
In the Shell, I'd try something similar to...
cd /ACCT/GRP; for f in *; do; tobyte -at $f /hfs/dir/$f; done
and similar construct for getting the other way.
This might cause problems if the number and/or length of the filenames
is very large and causes some trouble for the * expansion in the "for"
command. In that case one might try something based on xargs instead.
A command file using LISTFILE > $NEWPASS and looping through $OLDPASS
should also be possible, however it would probably be much more typing,
so I'd only consider it, if the Shell approach does not work well.
Lars.
PS: Okay, if I were curious enough about the MPE approach, I'd try...
: print > foreach
parm doWhat="showvar s,f"
setvar n finfo(hpstdin,"eof")
setvar k 1
while k <= n do
input s
setvar f word(s,"/",4)
!doWhat
setvar k k+1
endwhile
:eod
: print > doToByte
xeq /bin/tobyte "-at !s /hfs/dir/!f"
:eod
: listfile /ACCT/GRP/@ ,6 > $oldpass
: foreach < $oldpass
: foreach < $oldpass doToByte
Notice that the above is totally untested, pure "think pink" and non-MPEX.
|
|
|