Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!cs.utexas.edu!usc!polyslo!dorourke
From: dorourke@polyslo.CalPoly.EDU (David M. O'Rourke)
Newsgroups: comp.sys.mac.programmer
Subject: A problem with MPW....
Message-ID: <13644@polyslo.CalPoly.EDU>
Date: 17 Aug 89 17:21:32 GMT
Reply-To: dorourke@polyslo.CalPoly.EDU (David M. O'Rourke)
Organization: Cal Poly State University -- San Luis Obispo
Lines: 38


  I wrote a shell script that will list all of the directories in a 
certain pre-defined directory and make menu equivilants to do a lot of
work when I choose that menu.  Now I didn't want the menu options to have
the colon's in their names so I decided to use 'translate' to translate 
the colon's to nothings, and I add the colon's by hand later in the
script.

  Now for the problem......

  files -d | translate : ''

  works fine, and I get a list of what I want.

  but when I make it part of a for loop to loop across all of the directory 
names

  for dir_name in `files -d | translate : ''`
    [do_some stuff]
  end

  translate dies complaining that
 "# MPW.Pipe.# isn't of type TEXT, terminate and screw you "

  that's not the exact error message but apparently if you try and
execute the command inbetween some back quotes translate doesn't like
the pipe file type and dies, but if you just do the command directly in
the shell it works fine.

  Anyone have any ideas, short of me writting my own translate that won't
care about the file type.

  Apple???
-- 
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\|/////////////////////////////////////////
David M. O'Rourke____________________|_____________dorourke@polyslo.calpoly.edu
|  God doesn't know, he would have never designed it like that in the first   |
|_ place. ____________________________________________________________________|