Find the answer to your Linux question:
Results 1 to 5 of 5
Hello, I wrote a small shell script and this script should use the Code: #!/bin/bash Then I uploaded the shell script onto a remote pc and tried to start the ...
  1. #1
    Just Joined!
    Join Date
    May 2007
    Posts
    3

    Question Find out which bash is in use

    Hello,

    I wrote a small shell script and this script should use the

    Code:
    #!/bin/bash
    Then I uploaded the shell script onto a remote pc and tried to start the script. But there was the error message, that bin/bash is a bad interpreter.

    How can I find out, which bash is in use oder available on the remote pc?

  2. #2
    Just Joined!
    Join Date
    May 2007
    Posts
    3
    I found a solution. No more answers are neccessery .

  3. #3
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,344
    So what is the solution? If you find out a solution to something, its important that you share with everyone else. One method I use on BSD is to do something like
    Code:
    #!/usr/bin/env bash
    instead of
    Code:
    #!/bin/bash

  4. #4
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Also, on the machine you're running the script on try which bash

    Bash is popular in the Linux world, but it's not always installed on other unixes. If it's there, that will give you the FQ path.

  5. #5
    Just Joined!
    Join Date
    May 2007
    Posts
    3
    Quote Originally Posted by daark.child View Post
    So what is the solution? If you find out a solution to something, its important that you share with everyone else. One method I use on BSD is to do something like
    I don't dare to say, that I forgot to change the execution rights on the script and that's why there was the error message "bad interpreter : permission denied".

    Next time, put mind in gear before start writing .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...