ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hello everbody,
I am new to linux interface, i have made a script in linux using bash commands.
Now is there any way that i can convert the file in binary or any other format so that no one can modify/view the source code ?????????
dear Ifur
i dont even want the root user to open the source ???
Like we code in c++ (in linux) and then compile it with
g++.
Is there anything like that we can do to bash shell ????
is it possible that you are reffering to the binary files? Which actually can be seen/printed but it prints out garbage. Well if you are, maybe this would help. Binary file is machine code, while *sh scripts are just sets of commands, that you could easily type directly in the console, and are used mostly to automate tasks.
lfur, he clearly knows what a bash script is as he's just written one, and also what binary code is as that what he's aluding too. he just wants the contents of it not to be available to it's users.
I am completely aware of my post being somehow naive, but sometimes the most obvious thing is just not so obvious as it seems.
Just an example: there was a guy, whos vim was acting very weird. It wasn't recognizing commands and a bunch of other stuff. People wer suggesting him to have a look at his Xmodmap file and all sorts of things related to input devices and broken software. But the real problem was, that there was no .vimrc in his home dir - and he was no vim newbie.
This example surely isn't related to bash script problem, but the meaning of my post here is what I've already said: sometimes even the most obvious things just aren't as obvious as they seem.
dear dear all,
i think i am not able to clear my problem,
lets see
i have written a shell programme which does specific jobs, Now i want to give / distribute this shell to other branches of my office, BUT i dont want them to see / alter my code BUT they should be able to run the file (shell).
What can i do now ???????
I think I know what you're talking about. On an old DOS box I've got a program called bat2exec which takes a batch file and compiles it into a .com file which makes it very difficult to reproduce or modify. (The actual purpose is just to speed execution of large batch files.) A compiler for scripts just like gcc compiles C. I don't know if there's anything like a 'bash2bin' kind of function or utility for Linux but am I least understanding what you want? I mean, it's not encrypted or anything or password protected or whatever, but they still wouldn't be able to view the actual script. And they could run it.
Sucks that you can't just chmod -rwx--x--x to allow 'execution without reading or writing'.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.