Re: .profile question

From: Corné Beerse (I.Dont_at_want.your.spam)
Date: 08/27/03


Date: Wed, 27 Aug 2003 17:31:20 +0200


"Philippe.Dimonte" wrote:
>
> HI,
>
> I try to change the original shell by a program of my own but i don't know

chsh is your command to change the login shell. It most times only
allows a pre-devined list of shells. See manpage on chsh for details.

> how to execute the .profile

Not all shells do use .profile, specially the csh and variants, they use
.login and .cshrc. read manual pages on shells for details.

> file from my program in order to keep the ENV variables created. Any idea ?

ENV variables are propagated from parent process ot child process. The
shell is just a program. On the other hand, to change or create
environment variables, see the manual of your shell for details.
Roughly: sh and variants just `set` a variable and then `export` them to
the environment. chs and variants have a command `setenv` that directly
sets an environment variable.

>
> Any help would be appreciatd, Thanks!

What are you doing, writing your own shell without knowing the available
alternatives? Or just tweaking a program that starts a shell but you
want it to start something else?

I once wrote a bare-minimal shell in about 100 lines (it fittet on 2
pages ribbon paper) It could do forground commands, background commands,
pipelines, i/o redirection and environment variables. Unfortunatly, I
lost the source...

CBee



Relevant Pages

  • Bash-4.0 available for FTP
    ... Unlike previous bash distributions, this tar file includes the formatted ... The shell has been changed to be more ... rigorous about parsing commands inside command substitutions, ... Changes have been made to the Readline library being released at ...
    (gnu.announce)
  • Why newbies dont RTFM...
    ... Even though I've used Linux before, I've never had to do any ... BASH BUILTIN COMMANDS ... last command exited within ... unless the shell is not exeâ ...
    (comp.os.linux.misc)
  • Re: Great SWT Program
    ... None of the nasty things that you have said or implied about me are at ... treat the file as input (manually invoking the command interpreter ... script, copy the line into that within the editor, exit, and invoke ... the shell script. ...
    (comp.lang.java.programmer)
  • Re: Piping output of one command into builtin "read" command
    ... #Java is revision 1.4 ... environment variables are, like arguments, strings passed from ... command to command. ... I thing you're confusing it with shell ...
    (comp.unix.shell)
  • Re: ksh silently ignores function if mistakenly not autoloaded
    ... Here's the order of execution. ... This really takes place prior to command ... Shell scripts, with all their power, have one major drawback - they ... In the Korn Shell, there are two separate syntaxes for defining ...
    (comp.unix.shell)