*BSD News Article 57654


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!news.kei.com!newsfeed.internetmci.com!in1.uu.net!feenix.metronet.com!fohnix.metronet.com!not-for-mail
From: tye@fohnix.metronet.com (Tye McQueen)
Newsgroups: alt.unix.wizards,comp.unix.admin,comp.unix.advocacy,comp.unix.aix,comp.unix.bsd.misc,comp.unix.solaris,comp.unix.ultrix
Subject: Re: A challenge
Followup-To: comp.unix.admin,comp.unix.advocacy
Date: 21 Dec 1995 08:57:51 -0600
Organization: Texas Metronet, Inc  (login info (214/705-2901 - 817/571-0400))
Lines: 36
Distribution: inet
Message-ID: <4bbslg$je8@fohnix.metronet.com>
References: <4b4q0l$pc3@news.inc.net> <4b5e2r$nma@shocker.mid.net> <4b9kvv$ria@hecate.umd.edu>
NNTP-Posting-Host: fohnix.metronet.com
Xref: euryale.cc.adfa.oz.au alt.unix.wizards:2504 comp.unix.admin:36358 comp.unix.advocacy:12504 comp.unix.aix:67087 comp.unix.bsd.misc:399 comp.unix.solaris:55257 comp.unix.ultrix:26578

[Follow-ups set to only comp.unix.admin and comp.unix.advocacy.
 If your response is about useful suggestions on how to do this,
 then follow-up only to comp.unix.admin.  If it is "See Unix
 (sucks|is great)!", then use only comp.unix.advocacy.  Thanks!]

ed@astro.umd.edu (Ed Schmahl) writes:
) Here's a question (possibly useful, possibly stupid) that none of the
) Unix wizards I know have been able to answer.  Let's see if anyone on
) the Net has any suggestions.
) 
) Say we've got a (gasp) Fortran program that outputs data to a file called
) R:foobar.  The program compiles fine on VMS and DOS operating systems, but not
) on Unix systems, which complains about the ":" as a directory tree separator.

It wouldn't complain.  ":" is just a valid character in a file name.
It would only "complain" if it was looking for an already-existing
R/foobar (because it wouldn't find it).  But if it already exists
then the solution is almost trivial (based on my interpretation of
the limited description you have given).

) The obvious (non wizardly) way to solve this is to modify the source code to 
) sense the OS that it's being compiled under and change the ":" to a "/"
) when it's compiled under Unix.  But is there a (wizardly) way
) to force Unix, during run time, to accept R:foobar as if it was R/foobar?

    % ln -s R/foobar R:foobar

If there are tons and tons of possible values for "foobar", then
you could instead grab the source for your favorite "virtual" file
system (NFS, RFS, "ramdisk", etc.) and hack that source to do the
transformation you propose.  Then run the program with its working
directory on such a mounted file system.
--
Tye McQueen                 tye@metronet.com  ||  tye@doober.usu.edu
             Nothing is obvious unless you are overlooking something
       http://www.metronet.com/~tye/ (scripts, links, nothing fancy)