Find the answer to your Linux question:
Results 1 to 2 of 2
Hi. I had a shell script running on a BASH shell who worked pretty well. However, i try to run it on a ASH shell, and now it's returning the ...
  1. #1
    Just Joined!
    Join Date
    Jun 2006
    Location
    Leiria, Portugal
    Posts
    8

    Porting a shell script from BASH to ASH



    Hi.

    I had a shell script running on a BASH shell who worked pretty well. However, i try to run it on a ASH shell, and now it's returning the following error:

    Syntax error: Bad substitution

    The problem is i use the method ${PARAMETER//PATTERN/STRING} to replace PATTERN for STRING in a string labelled as PARAMETER, and perhaps this is just for BASH shell.

    How can i do a similar thing with ASH shell?

    Thank you

  2. #2
    Linux User
    Join Date
    Aug 2005
    Location
    Italy
    Posts
    401
    Surely you can use a sed command, but I can't say how you can do it, because I don'ět know how use sed!
    When using Windows, have you ever told "Ehi... do your business?"
    Linux user #396597 (http://counter.li.org)

Posting Permissions

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