|
From: | Wolfgang Lux |
Subject: | Re: Customizable filesystem support for GNUstep |
Date: | Fri, 9 Mar 2007 11:37:46 +0100 |
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 offoreach 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
[Prev in Thread] | Current Thread | [Next in Thread] |