|
From: | Dan Muresan |
Subject: | Re: [Chicken-users] a file system using Chicken |
Date: | Sun, 10 Jun 2007 15:54:50 +0300 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070509 SeaMonkey/1.1.2 |
On Sun, Jun 10, 2007 at 03:30:15PM +0300, Dan Muresan wrote:While I understand the spirit of POSIX advocacy, note that this thread is about a Linux file system. Also, care to share the concrete solution in this case? What's the POSIXly correct way to load a script in the current shell ("." or "source" in bash, neither of which works in dash)?How about $(cat filename) or `cat filename`?
No. I'm surprised you've never run across the "source" or "." commands, they're fairly common. They execute execute scripts in the current shell (as opposed to spawning a new shell process). They're essential when you want a script to modify the environment of the current shell (e.g. set some shell variables, like the /etc/profile.d/* series). In my case though I was just micro-optimizing.
Cheers, Dan
[Prev in Thread] | Current Thread | [Next in Thread] |