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

  • SEARCH
  • Home
  • 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 7714433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:07:33+00:00 2026-06-01T02:07:33+00:00

I am not a Solaris expert and I am trying to create a shell

  • 0

I am not a Solaris expert and I am trying to create a shell script that will change my prompt to PWD and the ksh to bash and I have this:

PS1=’$PWD $ ‘ exec bash –noprofile –rcfile /dev/null

or

PS1=’\w $’ exec bash –noprofile –rcfile /dev/null

Both of them dont work from a sh. if i add them from the command line then the first time my bash appears on prompt and the second time the PS1=’$PWD $’ kicks in and my prompt changes.

Firstly, why is PS1=’$PWD $’ not working from shell script . and why do i have to run the command from command line twice to acheive my results.

Also, in my export/home/syed/ directory there are three files local.login, local.profile, and local.cshrc. is there any way i can use them that when ever i log in i dont need to run my shell script and upon login i get bash shell and my prompt as i want it
(am i asking too much, i dont like the ksh as it does not have any features like up arrow recall last commands and tab auto complete features)

thanks
Syed…

  • 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-06-01T02:07:34+00:00Added an answer on June 1, 2026 at 2:07 am

    When you exec from within a script, the script is what is replaced, not the parent shell.

    Try sourcing the script rather than running it.

    Also, in Solaris, you can use passwd -e to change your login shell.

    You may be able to symlink ~/.profile to your existing ~/local.profile (or similar). Note that .cshrc is for the C Shell and is not compatible with ksh or Bash.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

the following script testssh.ksh proves that ssh have some problems when we try to
I'm trying to compile samtools on a Solaris server where I do not have
I am using Solaris 5.10 and working on Bash Shell . I have a
(Not related to versioning the database schema) Applications that interfaces with databases often have
I am trying to copy a link on Solaris OS but find that it
I have a Solaris process, which is a C++ application that is loaded by
I'm currently trying to make cx_freeze to work on a Solaris workstation I have
I have an application that runs on a server under Solaris. This application exports
We have applications on Solaris 10 servers that generate text logfiles. We need to
Please understand that I am not trying to start a flame war. I am

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.