📄 readme
字号:
Some examples of ready-to-dynamic-load builtins. Most of theexamples given are reimplementations of standard commands whoseexecution time is dominated by process startup time. Theexceptions are sleep, which allows you to sleep for fractionsof a second, finfo, which provides access to the rest of theelements of the `stat' structure that `test' doesn't let yousee, and pushd/popd/dirs, which allows you to compile them outof the shell.All of the new builtins in ksh93 that bash didn't already haveare included here, as is the ksh `print' builtin.The configure script in the top-level source directory uses thesupport/shobj-conf script to set the right values in the Makefile,so you should not need to change the Makefile. If your systemis not supported by support/shobj-conf, and it has the necessaryfacilities for building shared objects and support for thedlopen/dlsyn/dlclose/dlerror family of functions, please makethe necessary changes to support/shobj-conf and send the changesto bash-maintainers@gnu.org.Loadable builtins are loaded into a running shell with enable -f filename builtin-nameenable uses a simple reference-counting scheme to avoid unloading ashared object that implements more than one loadable builtin beforeall loadable builtins implemented in the object are removed.Many of the details needed by builtin writers are found in hello.c,the canonical example. There is no real `builtin writers' programmingguide'. The file template.c provides a template to use for creatingnew loadable builtins.basename.c Return non-directory portion of pathname.cat.c cat(1) replacement with no options - the way cat was intended.cut.c cut(1) replacement.dirname.c Return directory portion of pathname.finfo.c Print file info.getconf.c POSIX.2 getconf utility.getconf.h Replacement definitions for ones the system doesn't provide.head.c Copy first part of files.hello.c Obligatory "Hello World" / sample loadable.id.c POSIX.2 user identity.ln.c Make links.logname.c Print login name of current user.Makefile.in Simple makefile for the sample loadable builtins.mkdir.c Make directories.necho.c echo without options or argument interpretation.pathchk.c Check pathnames for validity and portability.print.c Loadable ksh-93 style print builtin.printenv.c Minimal builtin clone of BSD printenv(1).push.c Anyone remember TOPS-20?README READMErealpath.c Canonicalize pathnames, resolving symlinks.rmdir.c Remove directory.sleep.c sleep for fractions of a second.strftime.c Loadable builtin interface to strftime(3).sync.c Sync the disks by forcing pending filesystem writes to complete.tee.c Duplicate standard input.template.c Example template for loadable builtin.truefalse.c True and false builtins.tty.c Return terminal name.uname.c Print system information.unlink.c Remove a directory entry.whoami.c Print out username of current user.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -