comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Problem with "~" in Unix FINDFILE, still?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Problem with "~" in Unix FINDFILE, still? [message #2322 is a reply to message #2314] Thu, 09 June 1994 06:04 Go to previous messageGo to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
pendleton@ossenu.astro.nwu.edu (Jim Pendleton) writes:

> Could someone verify the following Unix IDL "bug" for me in a more recent
> version of IDL than 3.0.0?

> The problem I am seeing is that the FINDFILE function doesn't properly
> interpret a "~" as a symbol for the home directory.

> For instance

> IDL> A = FINDFILE("-F ~ | grep /")

> results in zero entries for me in both Ultrix and SunOS versions of IDL 3.0.0.

> However,

> IDL> SPAWN, "ls -F ~ | grep /", OUTPUT
> IDL> PRINT, OUTPUT

> produces output as I would expect. Note that the use of a "." for current
> directory rather than a "~" does work properly.

I'm not sure that one can describe it as a *bug* exactly. :^) The ~ symbol is
a function of the C shell (and some others such as tcsh and ksh). However, the
Bourne shell does not appear to recognize ~ as $HOME. Probably, IDL spawns out
to the Bourne shell to find files.

These days, though, most people use some other shell than the Bourne shell. It
would be nice if IDL interpreted ~ as they expect it to. I never thought to
try something as fancy as Jim Pendleton did, but I would expect to be able to
say something like

IDL> A = FINDFILE('~/*.dat')

Bill Thompson
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL and NIS - cd?
Next Topic: Elementary image question

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:11:37 PDT 2025

Total time taken to generate the page: 0.00527 seconds