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
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep