Timeline for Are compiled shell scripts better for performance?
Current License: CC BY-SA 4.0
14 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 24 at 11:28 | history | edited | Stephen Kitt | CC BY-SA 4.0 |
Mention Bunster (thanks jesse_b!).
|
| Oct 23, 2020 at 7:14 | comment | added | Shadur-don't-feed-the-AI | @johndoe That's the short of it. | |
| Oct 22, 2020 at 17:35 | comment | added | Stephen Kitt | @l0b0 it uses Alleged RC4. | |
| Oct 21, 2020 at 21:24 | comment | added | john doe |
So essentially the only valid purpose of shc was for people who write insecure code and want to hide their hard coded passwords and vulnerabilities, or script kiddies who are trying to hide obvious malware with the lowest amount of effort possible?
|
|
| Oct 21, 2020 at 20:47 | history | edited | Stephen Kitt | CC BY-SA 4.0 |
Explain that shc is actually useless.
|
| Oct 21, 2020 at 16:22 | comment | added | Charles Duffy | ...and if you're calling awk, sed and grep, the details of those calls can be traced by anyone who cares, so there's very little security that something trying to obfuscate the parent shell's actions can achieve. | |
| Oct 21, 2020 at 4:12 | comment | added | Peter Cordes |
@CaptainMan: If you were programming in a compiled language, you'd read the data yourself and use a regex library instead of fork+exec of multiple separate processes, each of which have to pay the startup overhead for a new process, and for dynamic linking (which is a significant part of the total cost for running grep on a short file). Also, for large amounts of data, avoiding piping the data between processes, costing some overall memory bandwidth, and synchronization between cores in the kernel. You wouldn't expect a shell-script compiler to do that, hence Shadur's point: avoid entirely
|
|
| Oct 20, 2020 at 16:50 | comment | added | Captain Man | @Shadur In addition, many times shell scripts are calling compiled programs that do the heavy lifting, so it's not too much of a boost anyways. E.g., if you have a script that calls awk, sed, and grep, those are all compiled. | |
| Oct 20, 2020 at 12:30 | history | edited | Stéphane Chazelas | CC BY-SA 4.0 |
added 205 characters in body
|
| Oct 20, 2020 at 10:18 | comment | added | Shadur-don't-feed-the-AI | To be honest, if performance is that big an issue you probably shouldn't be looking at shell scripts in the first place. | |
| Oct 20, 2020 at 8:45 | comment | added | Stephen Kitt | Comeau Computing used to market CCsh, but they’re out of business, and I’m not aware of any other shell compiler. | |
| Oct 20, 2020 at 8:25 | comment | added | adazem009 |
Thanks for your answer. Are there other ways to compile shell scripts without using shc?
|
|
| Oct 20, 2020 at 8:24 | vote | accept | adazem009 | ||
| Oct 20, 2020 at 8:21 | history | answered | Stephen Kitt | CC BY-SA 4.0 |