This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

was: bash loop troubles


Igor Pechtchanski wrote:

> If I guessed correctly at what you're trying to accomplish (create aliases
> *in your current shell* to duplicate cmd.exe's syntax for switching
> drives; not at all obvious from the above description), and how you're
> doing it (from the inside of a bash *script*), you seem to have forgotten
> that scripts run in a subshell, and aliases created within that subshell
> will not get propagated back to the parent shell.

Perfect, that's it! Indeed, I didn't think of *that*.
Thus, placing the loop inside /etc/alias which is sourced from /etc/profile
with
the line:

test -e /etc/alias && . /etc/alias

it'll create my intended drive letter assignments a:, b:, c: etc.
And Larry's right, this isn't Cygwin specific...

Thank you very much, Igor.
Greetings,

Michael


-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]