discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Customizable filesystem support for GNUstep


From: Robert Slover
Subject: Re: Customizable filesystem support for GNUstep
Date: Fri, 09 Mar 2007 20:09:15 -0500

This was news to me. Thanks. I rarely use CSH, and this worked on the two boxes I tried it on.

But you are correct, just tried this on Solaris and it fails. They more-or-less apologize for this in the NOTES on the CSH man page.

Thanks,

--Robert

On Mar 9, 2007, at 5:37 AM, Wolfgang Lux wrote:

Robert Slover wrote:

To avoid the overhead of starting the Bourne shell just to utilize IFS, you can use a csh variable modifier to break the path up on each ':'

foreach dir ( "" ${GNUSTEP_TOOLS_PATHLIST:as~:~ ~} )

instead of

foreach dir ( `/bin/sh -c 'IFS=:; for i in '"${GNUSTEP_TOOLS_PATHLIST}"'; do echo $i; done'` )

:a --> apply to all
:s~a~b~  --> substitute string b for string a

(Note that there is a space between the last two tildes, so this substitutes a space for all colon delimiters in the variable value).

Well, yes -- except that it is not portable. For instance, /bin/csh
on Solaris does not support :s modifiers on variables (and neither
understands the a modifier).

Regards
Wolfgang







reply via email to

[Prev in Thread] Current Thread [Next in Thread]