Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6870979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:44:59+00:00 2026-05-27T03:44:59+00:00

Look to my session: gavenko+bash# echo $SHELL /bin/bash gavenko+bash# script Script started, file –

  • 0

Look to my session:

  gavenko+bash# echo $SHELL
  /bin/bash
  gavenko+bash# script
  Script started, file - typescript
                                   sh-4.1$ ^C
  sh-4.1$ exit
  Script started, file - typescript


  gavenko+bash# SHELL=/bin/bash script
  Script started, file - typescript
                                   gavenko+bash# ^C
  gavenko+bash# exit
  Script started, file - typescript


  gavenko+bash# export SHELL
  gavenko+bash# script
  Script started, file - typescript
                                   gavenko+bash# ^C
  gavenko+bash# exit

As you can see first time script does not use SHELL, second time use it
and third time use it.

So SHELL env var does not exported by bash…

Why?

Is this right add

  export SHELL

to ‘~/.bashrc’?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:44:59+00:00Added an answer on May 27, 2026 at 3:44 am

    See answer to my question: http://cygwin.com/ml/cygwin/2011-10/msg00269.html

    This is a bug in bash which hides broken behavior
    in the OS.
    
    Bash expects this to be an existing environment variable,
    and it usually is in normal Unix like operating systems.
    
    However, bash internally sets the variable if it is
    missing (without exporting it):
    
    `SHELL'
    The full pathname to the shell is kept in this environment
    variable. If it is not set when the shell starts, Bash assigns to
    it the full pathname of the current user's login shell.
    
    It is correct not to export the variable. Bash might not be
    the user's shell, so it has no right to introduce itself as
    the SHELL to child processes.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

look at this code, <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <script> function change() {
Can someone look at my two functions below and suggest what I can do?
Look at code below: <?php $output += <table border='1'> <tr> <th>Session ID</th> <th>TeacherUsername</th> <th>Teacher
Can I just use Session[role] = theRole, or that would be a bad practice,
I recently started to look into asp.net mvc. Here is my issue. Say every
Look at this image: alt text http://img139.imageshack.us/img139/4488/picture2ep3.png I know how to add UITableView with
Look at this situation: www.websitea.com displays an img tag with a src attribute of
Look at this: $('form).submit(function (event) { $(':input.required').trigger('blur'); var num = $('.warning', this).length; alert(num);//Focus here!
Look at the following picture, which is showing a smart tag for DataGridView. DataGridView
Look ath this method of ThreadPoolExcecutor: public void execute(Runnable command) { ... if (runState

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.