I am writing a bash script which I would like to be as portable as possible.I require that bash version 2 is installed, but I DON'T want to require a fixed location for it.The following wrapper should search bash in the current PATH and execute itself using it.The only bug is that "bash something" first search "something" in the current directory,and then in the current PATH. This can lead to some problem if a file with the same nameof the script itself exists in the current directory.

Any suggestion?Any simpler way to solve this problem?Do you know if this solution is REALLY portable on any system (a part from the bug I exposed)?

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum