Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

geirha/bash-builtins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A small collection of loadable bash builtins I've written, mainly to see what is possible to do with loadable builtins. Some of these may be useful.

  • asort - sort arrays in-place
  • csv - read and write CSV rows
  • md5 - calculate md5 sum

Preparation

Currently bash 4.4 is not yet released, and one of the new things in bash 4.4 will be an easier way to build loadable builtins. So until bash 4.4 is released and systems have caught up with this new version, you'll have to build it yourself, or at least configure it and install the headers

Grab the bash devel sources

If this is the first time, clone the repository

git clone git://git.sv.gnu.org/bash.git

Then enter the cloned repo, and switch to the devel branch:

cd bash &&
git checkout devel &&
git pull

Then configure it and run make on the install-headers target

./configure &&
make &&
make install-headers &&
make -C examples/loadables install-dev

The above should install "$prefix/lib/bash/Makefile.inc" in addition to some header files.

Build bash-builtins

To build, just run

make

If you specified a --prefix on the configure, add this to make so it finds the installed files:

make prefix=/some/where

Install

To be continued...

About

Bash builtins

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published