# Hiding shell script code

**URL:** <https://community.unix.com/t/hiding-shell-script-code/323405>\
**Category:** UNIX for Dummies Questions & Answers\
**Created:** [January 28, 2013, 7:36am UTC](https://community.unix.com/t/hiding-shell-script-code/323405 "2013-01-28T07:36:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dish](https://community.unix.com/user_avatar/community.unix.com/dish/32/8506_2.png) [@Dish](https://community.unix.com/u/Dish)\
**Post date:** [January 28, 2013, 7:36am UTC](https://community.unix.com/t/hiding-shell-script-code/323405/1 "2013-01-28T07:36:14Z")

</div>

How can we share a script without actually sharing the code?

I have 4 scripts in my system.

The end user has to execute the first file and based on the inputs (I am reading 1, 2 , 3 as options) my shell script will execute respective script files.

Now I dont want to share all the 4 script files and share just one.

Is it possible with shell scripts?

---

<div class="post-metadata">

**Author:** ![Hammadi\_dali](https://community.unix.com/letter_avatar/hammadi_dali/32/6_449c533f586939b6e5f246632a46421f.png) [@Hammadi\_dali](https://community.unix.com/u/Hammadi_dali)\
**Post date:** [January 28, 2013, 8:01am UTC](https://community.unix.com/t/hiding-shell-script-code/323405/2 "2013-01-28T08:01:07Z")

</div>

Try to adjust access to the remaining scripts by keeping only execution right, or move them to directory accessible only by their owner.

---

<div class="post-metadata">

**Author:** ![Iced\_R](https://community.unix.com/letter_avatar/iced_r/32/6_449c533f586939b6e5f246632a46421f.png) [@Iced\_R](https://community.unix.com/u/Iced_R)\
**Post date:** [January 28, 2013, 8:01am UTC](https://community.unix.com/t/hiding-shell-script-code/323405/3 "2013-01-28T08:01:12Z")

</div>

You can use sudo, or you can give only execution flags to the archive for other users.

---

<div class="post-metadata">

**Author:** ![jgt](https://community.unix.com/user_avatar/community.unix.com/jgt/32/10703_2.png) [@jgt](https://community.unix.com/u/jgt)\
**Post date:** [January 28, 2013, 8:03am UTC](https://community.unix.com/t/hiding-shell-script-code/323405/4 "2013-01-28T08:03:09Z")

</div>

Is this what you meant ? [String hash/obfuscation in ksh Post: 302190058](http://www.unix.com/302190058-post1.html)
