Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: bash and sh

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    bash and sh


    Really beginner question here.

    I have a Suse 10.3 install. Some sh scripts (#!/bin/sh as first line) don't
    execute at all. I noticed /bin/sh is linked to /bin/bash. I understand that
    bash is 100% compatible with sh.

    The things that don't execute correctlly (found by commenting out
    succesively) are:
    - nested if statements
    - case esac statements
    - function declarations

    I have no idea why these sh scripts fail.

    Thanks for any help

  2. #2

    I had ommitted the "-a" option to unzip. So all my scripts had
    the friendly windows line - end encoding

    Works fine now.

Posting Permissions

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