Solved

shell?

Posted on 2000-02-24
8
437 Views
Last Modified: 2010-08-05
1) I was trying to compile the source of a program [ make -f unix/Makefile generic]on one of my machine, I was prompted with the error "Couldn't load shell". I am the root.

2) How can I change from one shell to another? korn to C shell or to borne

3) What is this ? [#!/bin/sh], found in some script files.

appreciate if someone can help me understand this.

Thank you.
0
Comment
Question by:ycgoh
  • 2
  • 2
  • 2
  • +2
8 Comments
 

Expert Comment

by:arnbws
ID: 2556968
You can change shells using the command chsh provided that the sys admin has added the shell you wish to change to in the /ect/shells directory-- not a problem if you are logged in as root. The chsh command will query you for your password and then the path of the new shell (/bin/bash or /bin/csh forinstance). I hope this helps.

0
 

Expert Comment

by:arnbws
ID: 2556975
arnbws changed the proposed answer to a comment
0
 
LVL 2

Expert Comment

by:jonke
ID: 2557307
1)Don't know how C compiles so cannot answer

2)type ksh to change to  a korn shell. type sh to change to a bourne shell, type csh to change to a c shell. To find out what shell you are currently using type: env |grep SHELL

3)The #!/bin/sh Tells the script what shell to run in:

#!/bin/sh      =run script in bourne shell
#!/bin/ksh      =run script in korn shell
#!/bin/csh      =run script in c shell
0
 
LVL 33

Expert Comment

by:hongjun
ID: 2558124
jonke's comment is helpful.

hongjun
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Accepted Solution

by:
cartoon022100 earned 10 total points
ID: 2558232
HI ycgoh,

You could not load the shell ,because there may be a chance that you are trying to use a shell that is not present in your system.If that is the case ,try using sh/tcsh/ or whatever that u have.

To change shells you can just type ksh or tcsh or other shells that you want use provided those shells are present in your system.check for those shells in "/bin"


The "#!/bin/sh" is normally found in the first line of shell scripts
This is nothing but the location of the shell present in your system.
Given that in the first line informs that ,that particular shell will be used through out the shell script.

Regards,
Inigo
0
 

Author Comment

by:ycgoh
ID: 2558288
Thank guys... so embarassing!
0
 
LVL 2

Expert Comment

by:jonke
ID: 2563948
You just gave the points to someone that gave exactly the same answers as me!

0
 

Author Comment

by:ycgoh
ID: 2565419
Hi Jonke,
I appreciate your comments and you too deserve the points.  

Nevertheless, I have read two of your accepted answers and had transfered some points to you.  I hope you will get it.  Sorry, about not awarding you the points.

Further, can you please take a look at my new question.

Thank you
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now