问题很简单;是否可以将书本改写成可执行的内容? 如果是,如何做到这一点?
I m attempting to write a bash script to parse out the following log file and give me a list of CURRENT players in the room (so ignoring players that left, but including players that may have rejoined)...
问题很简单;是否可以将书本改写成可执行的内容? 如果是,如何做到这一点?
这是可能的,但你不想。
在有支持将文字汇编成单独可执行的地方,这项工作是通过向可执行<>提供翻译的副本。 因此,这比单是文字大得多。
The execution model used by bash, unfortunately, is innately slow: Almost all functionality is provided by external commands; and simple commands arguments, or even their names, can be modified by the result of expansion operations. This level of dynamicism makes effective compilation for performance impossible. (zsh supports a precompilation process, but the benefit is limited, mostly to the process of parsing itself).
举例说: 它突然将文字原始来源作为指挥线理由。 因此,这一来源只能读到<代码>/proc的指挥线论据,或使用<代码>strace。
As they say, "security by obscurity is no security at all" -- anyone who s reasonably competent could trivially extract any passwords or other content obfuscated in this way.
www.un.org/Depts/DGACM/index_spanish.htm http://github.com/neurobin/shc”rel=“nofollow” (如Flavius Anton)。
但你们需要知道,这本书并非都是独立的。 这仍然取决于壳体,即如果该代码是专门为Bash写的,然后用sh子转换,则在该系统上没有安装Bash,就赢得了拖。
23bytes
of test
script turned into 9.6KB
of binary._SC_ARG_MAX
system configuration parameter.http://www.swag.uwaterloo.ca/bash2py/"rel=“nofollow”>bash2py 换算 Bash source Code to python source Code。 然后,你可以使用以下工具:cx_freeze,将沙尘来源转换为二元,独立运行,没有Download and install Bash2py
#!/bin/bash
echo works
bash2pyengine ./test
cxfreeze ./test.py
dist
directory for cx_freeze). You can find a binary (named test
) there. Run it from that directory. Note that the shared object files are the dependencies for this binary. You can port this binary as long as you take all the shared object files with it.test
script, original size is 23bytes
, test.py -> 38bytes
, test (binary) -> 1.3MB
, and total (binary and it s dependencies) -> 6.5MB!!!
Array
is orange colored (now) which means "not necessarily well supported", actually it s not supported at all (yet bash2py<=3.2
). So even the Bash to Python conversion is not well performed where you will have to consider the limitation of the next step (freezing) too.以上两者都没有实际的解决办法。 简言之,Bash2py
比shc
差,因为它没有支持所有巴什特征(yetbash2py<=3.2
)。 i.e 您可以自由书写代码,并期望与Bash2py合作。
在经过所有这些艰苦努力之后,我可以提供帮助,但同意:
It s possible, but you don t want to.
实际援引sh是sh——指挥。 如果该方案正在实施,则可以通过皮条获得源代码。 而且必须是一件好事。 为了解决这些问题,我开发了shellc,该软件是Gite Hub的公开来源,主要是通过类似于
I m attempting to write a bash script to parse out the following log file and give me a list of CURRENT players in the room (so ignoring players that left, but including players that may have rejoined)...
How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks
I like to write bash shell scripts on my iPhone, put them in an app folder with an icon, plist, etc., so they execute like apps by tapping their icon on SpringBoard. This is not interactive like ...
From a programming standpoint, when you set the bash shell to use vi or emacs via set -o vi or set -o emacs What is actually going on here? I ve been reading a book where it claims the bash shell ...
I am construcing a command in bash dynamically. This works fine: COMMAND="java myclass" ${COMMAND} Now I want to dynamically construct a command that redirectes the output: LOG=">> myfile.log ...
I want perform sha1sum file1 and sha1sum file2 and perform bitwise OR operation with them using bash. Output should be printable i.e 53a23bc2e24d039 ... (160 bit) How can I do this? I know echo $(( ...
I m 试图撰写一个双面文字,处理一个文件清单,其名字在投入档案中每栏一栏储存,就像一个一样。
Is it possible to set the Screen Title using a shell script? I thought about something like sending the key commands ctrl+A shift-A Name enter I searched for about an hour on how to emulate ...