2 shlib is a bash shell script library project. it allows programmer
3 to use shell script code as a library.
4 normally, script does not have a public dir to store global lib
5 files, we shoud use absolute path to 'souce' it. by using shlib, you
6 can install xxx.shlib to global shlib path, and use it like
7 'include xxx.shlib'. it provide a conception of system global shell
10 there is something should pay attention on debug string output when
11 we invoke it in a while loop with stdio re-direction.
16 echo output to file.txt
17 echo output as a debug info to console > $stdout
20 we should force to re-direct debug string to stdout file handler of
21 parent process that saved at first. absolute this output method as some
22 functions in shlib, we can re-use it next time by invoking 'dbgout xxxxxxx'
23 in stdio.shlib. and it is more easier then orignal system command.
24 that's the meaning of code re-use as a library for shell script.
26 when i wrote other programs by shell script, i put the public code
27 into a shlib file as a function feature. it can be re-used, and it let
28 the script programming more easier. some of usefull code can be share with
29 other developers, and shlib provide the general method to 'source' your
32 shell script is not a fully-featured program languge. it has many weekness
33 on some thing like paramter variable type. the purpose of shlib and some other
34 pkg like 'dvar' is used to let shell script to be a normal program language,
35 and keep its command line feature at the same time.
36 shlib is a pioneer on new sh-script language feature. some of them can be
37 inegerated into shell program, or developed as a binary program when it is widly