Results 1 to 7 of 7

Thread: Shell terminal for Mac OS X

  1. #1
    Join Date
    Mar 2010
    Posts
    197

    Shell terminal for Mac OS X

    Hello,
    We use putty on AIX machines, the shell is sh (bourne shell). With me I have a Mac running OS X it has a terminal but that runs under bash bourne - again shell. Trying to redo some exos at home but I feel as correspondence of code in the shell is not quite the same. The main concern is that can I run shell terminal on Mac OS X. If this is possible then please let me know. Thank you for your help.

  2. #2
    Join Date
    Nov 2009
    Posts
    356

    Re: Shell terminal for Mac OS X

    Hello,
    The problem is beyond me (just normal, I started). I occasionally commands in the terminal but I have not your problem. When you're in Terminal, you should go check the properties. On startup, you can have a bad path to the shell. I would look in that direction.
    In this section you can also define a different default shell.
    The shell is a program that is listed in the directory / bin.
    / bin / sh Bourne shell
    / bin / bash Bourne Again SHell shell
    / bin / csh C shell
    / bin / ksh Korn shell
    / bin / tcsh shell improved C
    / bin / zsh shell Z
    See if this can help you.

  3. #3
    Join Date
    Nov 2009
    Posts
    333

    Re: Shell terminal for Mac OS X

    Hello,
    Curious that on AIX, it is not rather ksh that is launched, but it is anecdotal. Your problem is probably the classic: the current directory is not in the definition of paths to executable. The environment variable PATH lists the directories where the shell (any shell does the same) will find the executable they are asked to run.
    To see the contents, you can do:
    Here is the code for this
    Code:
    echo $ PATH
    It seems that on OS X By default, the path "." is not included here [I'm not sure I know he is active with me but I have completely redefined the variable named above. Therefore we must explicitly give the path of the executable in the current directory. I guess this will help you.

  4. #4
    Join Date
    Nov 2009
    Posts
    518

    Re: Shell terminal for Mac OS X

    Hello,
    I agree with the above post and as a example I will explain you. So, if you create a file Myshell and want to run it, you type:
    Here is the code
    Code:
    . / Myshell
    As well you can satisfy you to do:
    Here is the code
    Code:
    sh Myshell
    1) Leopard, sh is actually bash.
    2) If you do not understand what I wrote, I advise you to do some search on internet.

  5. #5
    Join Date
    Mar 2010
    Posts
    197

    Re: Shell terminal for Mac OS X

    Hello,
    I simply put there must be a path problem as you have shown me.
    When I type. / sh shell and shell (shell is my script) it works. Why I point out to work just the file name and it runs? Always the story path? Curious that on AIX, it is not rather ksh that is launched, but it is anecdotal.
    Is it just me who confuses everything because I thought AIX was the sh shell? I have no idea what this means.
    Leopard, sh is actually bash.
    When I type the command echo $ PATH
    I ' get this: / usr / bin: / bin: / usr / sbin: / sbin: / usr / local / bin: / usr/X11/bin

  6. #6
    Join Date
    Nov 2009
    Posts
    518

    Re: Shell terminal for Mac OS X

    Hello,
    I have the same thing on my two Macs. So it is unfortunately not the case. You can always try to make a second Admin account from your machine to check if the terminal is working well. If you do not have the problem, we think it is a concern Benin. If you can anything better, there is a risk of deeper problems in the installation of OS X

  7. #7
    Join Date
    Nov 2009
    Posts
    330

    Re: Shell terminal for Mac OS X

    Hello,
    I have a dozen AIX servers, all configured with ksh default. To return to the topic: that's exactly what I said:
    Code:
    - '. / Shell' and 'sh shell' function 
    -  path '. " is not in the list of executable paths by default
    PATH variable is a collection of paths, separated by ':'. So you can run the command shell-being located in the same directory as the command itself, it must add '. " this list of paths, in general, I added the top variable (the order is taken into account).
    To test:
    Code:
    export PATH PATH =".:$ "
    After that, it should work for the current shell.
    PS: You should call your test command 'foo', 'myscript' or other, but not 'shell' because we do not understand anything and it is improper: your file is a script , not a shell.

Similar Threads

  1. Replies: 5
    Last Post: 22-08-2010, 02:39 AM
  2. The terminal of MAC OS X
    By jhon in forum Operating Systems
    Replies: 5
    Last Post: 09-02-2010, 08:47 AM
  3. Hide the terminal during execution of shell script
    By !const in forum Software Development
    Replies: 3
    Last Post: 25-04-2009, 06:58 PM
  4. How to Run Shell Scripts ?
    By Denisez in forum Tips & Tweaks
    Replies: 1
    Last Post: 28-03-2009, 12:52 PM
  5. Replies: 2
    Last Post: 29-03-2007, 06:29 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,727,392,324.86624 seconds with 17 queries