My requirement was:
In the FM file, the icon is there and the script works well when i click it, but when i publish PDF, nothing appears.
This is very urgent. I have to deliver deliverables.
At least in FM12, the File > Import > Object dialog shows the explanation "Inserts the contents of the file […] activate it using the program which created it". I read this as meaning you could insert the .sh file as an object and then open it from a .pdf with the editor that you used to create it: not run the .sh from the .pdf file. The dialog also offers a list of recognised programs, and on my PC the only [approximation to a] text editor in the list is Wordpad.
For a small .sh I'd be inclined to use File > Import > File (import by reference, of course) and then encourage the reader to copy/paste. I don't know how you could use FM to include a "download file" link – perhaps one of the hyperlink options? so I'll watch this thread with interest.
While I don't know of a way to embed a companion file in FrameMaker that will become a downloadable file in PDF, you can add the file to the PDF in Acrobat using the Tools > Edit PDF > Attach File command.