Re: source from within a script

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 06/13/04


Date: Sun, 13 Jun 2004 11:36:12 -0400

In article <40cc6edf$0$22984$9b4e6d93@newsread2.arcor-online.net>,
 "Bishara Sabbagh" <sabbagh@arcor.de> wrote:

> Thanks Bob,
>
> of course if I source the shell-script or .profile at the command prompt it
> will work, but the problem is how to do that from within the shell-script.
> if I use the source scriptname the script would go on forever
> and if I append the constucted alias to my .profile file
> and source it, the command is not recognised as if the source command was
> not executed at all.

>From the bash man page:

       Aliases are not expanded when the shell is not interactive,
       unless the expand_aliases shell option is set using shopt (see
       the description of shopt under SHELL BUILTIN COMMANDS below).

Could this be your problem?

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


Relevant Pages

  • Re: source from within a script
    ... of course if I source the shell-script or .profile at the command prompt it ... but the problem is how to do that from within the shell-script. ... if I use the source scriptname the script would go on forever ...
    (comp.unix.shell)
  • RE: POP3 fail to start on SBS 2003
    ... Outlook issue such as a corrupted profile. ... I suggest that we create a new Outlook profile. ... At the Microsoft Telnet command prompt, ...
    (microsoft.public.windows.server.sbs)
  • Re: logon/logoff scripts and runas
    ... perhaps the word "Profile" means too many different things depending ... registry hive for the user named in the runas command does not get "loaded" ... > Logon/Logoff in the event ...
    (microsoft.public.windows.group_policy)
  • Re: Issues and Tips with SyncToy v2 command-line
    ... Please allow Select Subfolders form to scale in size to avoid ... - Please document how to include/exclude entire paths from the command ... Please allow export of profile to a text file so we can check syntax ... Please allow the size of the All Folder Pairs grid to expand in size ...
    (microsoft.public.windowsxp.photos)
  • Re: Dataset copy error with FDR.
    ... I have requested the information from out RACF admin. ... When I issue the command LD DAG ALL doesn't that tell me what profile is protecting the dataset. ... Could these datasets be allocated in some special way that would cause FDR to try to put the new copies of the dataset back on the original volume? ...
    (bit.listserv.ibm-main)