Google Groups Home Help | Sign in
Message from discussion Sourcing file in the same shell using a command and csh
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
amirovic@googlemail.com  
View profile
 More options May 9, 10:25 am
Newsgroups: comp.unix.shell
From: "amiro...@googlemail.com" <amiro...@googlemail.com>
Date: Fri, 9 May 2008 07:25:17 -0700 (PDT)
Local: Fri, May 9 2008 10:25 am
Subject: Sourcing file in the same shell using a command and csh
Hi,

How can I solve the following scenario:

/--- source-file ---
| setenv MYPATH /my/path
\-----------------------

/--- executable-file ---
| #!/bin/csh
| source source-file
\-----------------------------

After running ./executable-file $MYPATH is not visible anymore since
the source-command has been executed in a different shell. If I remove
the shebang I get "./executable-file: line 1: setenv: command not
found".

How can I source a file in the running shell with the help of a
command?

Thanks and regards,
Amir


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google