Mirror of Suckless' sbase (git://git.suckless.org/sbase)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Wolfgang Corcoran-Mathe f5baf2630a
ed: Don't match against line 0 in search()
6 years ago
libutf Add mkrunetype.awk 8 years ago
libutil linecmp: Handle NUL bytes properly 7 years ago
LICENSE ed: Don't match against line 0 in search() 6 years ago
Makefile Add rev(1) 6 years ago
README Add rev(1) 6 years ago
TODO Rever the strmem() addition and add a TODO element 7 years ago
arg.h arg.h: fixed argv checks order 7 years ago
basename.1 Use ISO-date-format in manpages 8 years ago
basename.c Do not use arg.h for tools which take no flags 8 years ago
cal.1 Use ISO-date-format in manpages 8 years ago
cal.c cal: Highlight current day 7 years ago
cat.1 Use ISO-date-format in manpages 8 years ago
cat.c cat: fix u flag 7 years ago
chgrp.1 Use ISO-date-format in manpages 8 years ago
chgrp.c Cleanup usage() across sbase 7 years ago
chmod.1 Use ISO-date-format in manpages 8 years ago
chmod.c Add maxdepth to recurse() 8 years ago
chown.1 chown: fix user:group option parsing 7 years ago
chown.c chown: fix user:group option parsing 7 years ago
chroot.1 Use ISO-date-format in manpages 8 years ago
chroot.c Do not use arg.h for tools which take no flags 8 years ago
cksum.1 Use ISO-date-format in manpages 8 years ago
cksum.c cksum: Skip files with read errors and continue 8 years ago
cmp.1 Use ISO-date-format in manpages 8 years ago
cmp.c No need for semicolon after ARGEND 8 years ago
cols.1 Use ISO-date-format in manpages 8 years ago
cols.c Use the UTF8_POINT macro in cols(1) 7 years ago
comm.1 Use ISO-date-format in manpages 8 years ago
comm.c Rename struct linebufline to struct line and add linecmp() 7 years ago
compat.h Add compat.h 8 years ago
config.mk Use -D_FILE_OFFSET_BITS=64 by default 7 years ago
cp.1 Use ISO-date-format in manpages 8 years ago
cp.c No need for semicolon after ARGEND 8 years ago
cron.1 Use ISO-date-format in manpages 8 years ago
cron.c Sync cron with latest scron 7 years ago
crypt.h Refactor cryptcheck() to allow multiple list-files and stdin 8 years ago
cut.1 Use ISO-date-format in manpages 8 years ago
cut.c Support NUL containing lines in cut(1) 7 years ago
date.1 Use ISO-date-format in manpages 8 years ago
date.c No need for semicolon after ARGEND 8 years ago
dirname.1 Use ISO-date-format in manpages 8 years ago
dirname.c Do not use arg.h for tools which take no flags 8 years ago
du.1 Use ISO-date-format in manpages 8 years ago
du.c Fix type mismatches 7 years ago
echo.1 Use ISO-date-format in manpages 8 years ago
echo.c Do not use arg.h for tools which take no flags 8 years ago
ed.1 Add ed(1) - the standard text editor 7 years ago
ed.c ed: Don't match against line 0 in search() 6 years ago
env.1 Use ISO-date-format in manpages 8 years ago
env.c env: Check unsetenv() return value 7 years ago
expand.1 Use ISO-date-format in manpages 8 years ago
expand.c No need for semicolon after ARGEND 8 years ago
expr.1 Use ISO-date-format in manpages 8 years ago
expr.c Simplify return & fshut() logic 8 years ago
false.1 Use ISO-date-format in manpages 8 years ago
false.c Simplify true(1) and false(1) 9 years ago
find.1 Use ISO-date-format in manpages 8 years ago
find.c find: check whether readdir failed, and properly check timestamps 7 years ago
flock.1 Implement -o for flock(1) to close fd before exec 8 years ago
flock.c flock: Check for waitpid() error 7 years ago
fold.1 Use ISO-date-format in manpages 8 years ago
fold.c Support NUL containing lines in fold(1) and reuse the line-buffer(!) 7 years ago
fs.h Add SILENT flag to recurse() 8 years ago
getconf.1 getconf.1: fix: end list (El) 8 years ago
getconf.c use only one getconf header 7 years ago
getconf.sh getconf.sh: Be more explicit we are using a heredoc here 7 years ago
grep.1 Use ISO-date-format in manpages 8 years ago
grep.c grep: Fix -v output and exit status 7 years ago
head.1 Use ISO-date-format in manpages 8 years ago
head.c Support NUL containing lines in head(1) 7 years ago
hostname.1 Use ISO-date-format in manpages 8 years ago
hostname.c Do not use arg.h for tools which take no flags 8 years ago
join.1 Use ISO-date-format in manpages 8 years ago
join.c Support NUL containing lines in join(1) 7 years ago
kill.1 Use ISO-date-format in manpages 8 years ago
kill.c kill: Include strings.h for strcasecmp() 8 years ago
link.1 Use ISO-date-format in manpages 8 years ago
link.c Do not use arg.h for tools which take no flags 8 years ago
ln.1 Use ISO-date-format in manpages 8 years ago
ln.c ln: Only fail if same inode without -f flag 7 years ago
logger.1 Use ISO-date-format in manpages 8 years ago
logger.c No need for semicolon after ARGEND 8 years ago
logname.1 Use ISO-date-format in manpages 8 years ago
logname.c Add *fshut() functions to properly flush file streams 8 years ago
ls.1 Use ISO-date-format in manpages 8 years ago
ls.c ls: respect -q when printing directory names with -R 7 years ago
md5.h Add crypt.[ch] and update md5sum and sha1sum 10 years ago
md5sum.1 Use ISO-date-format in manpages 8 years ago
md5sum.c No need for semicolon after ARGEND 8 years ago
mkdir.1 Use ISO-date-format in manpages 8 years ago
mkdir.c No need for semicolon after ARGEND 8 years ago
mkfifo.1 Use ISO-date-format in manpages 8 years ago
mkfifo.c No need for semicolon after ARGEND 8 years ago
mktemp.1 Use ISO-date-format in manpages 8 years ago
mktemp.c No need for semicolon after ARGEND 8 years ago
mv.1 Use ISO-date-format in manpages 8 years ago
mv.c mv: Ensure stat is initialized when we prune a tree 7 years ago
nice.1 Use ISO-date-format in manpages 8 years ago
nice.c Check if PRIO_MIN and PRIO_MAX are defined 7 years ago
nl.1 Use ISO-date-format in manpages 8 years ago
nl.c Support NUL containing lines in nl(1) and reuse the line-buffer(!) 7 years ago
nohup.1 Use ISO-date-format in manpages 8 years ago
nohup.c Do not use arg.h for tools which take no flags 8 years ago
od.1 od: Add some missing type flags 7 years ago
od.c od: Don't advance past end of type string 7 years ago
paste.1 Use ISO-date-format in manpages 8 years ago
paste.c Properly use delimlen instead of len in paste(1) 7 years ago
pathchk.1 Fix pathchk manpage regarding exit status 7 years ago
pathchk.c pathchk: fixes and cleanup 7 years ago
printenv.1 printenv: exit status is 2 on failure 7 years ago
printenv.c printenv: exit status is 2 on failure 7 years ago
printf.1 Change the note in printf.1 on octal escapes 7 years ago
printf.c printf: support escaping '%' with '%%'. See printf(1p) EXAMPLES section. 7 years ago
pwd.1 Use ISO-date-format in manpages 8 years ago
pwd.c No need for semicolon after ARGEND 8 years ago
queue.h Use queue.h in grep(1) 8 years ago
readlink.1 readlink: Remove broken support for -m and -e 7 years ago
readlink.c readlink: Remove broken support for -m and -e 7 years ago
renice.1 Use ISO-date-format in manpages 8 years ago
renice.c Cleanup usage() across sbase 7 years ago
rev.1 Add rev(1) 6 years ago
rev.c Add rev(1) 6 years ago
rm.1 Use ISO-date-format in manpages 8 years ago
rm.c No need for semicolon after ARGEND 8 years ago
rmdir.1 Use ISO-date-format in manpages 8 years ago
rmdir.c No need for semicolon after ARGEND 8 years ago
sed.1 Use ISO-date-format in manpages 8 years ago
sed.c Revert "fix length after '\' getline string termination" 7 years ago
seq.1 Use ISO-date-format in manpages 8 years ago
seq.c Cleanup usage() across sbase 7 years ago
setsid.1 Use ISO-date-format in manpages 8 years ago
setsid.c Do not use arg.h for tools which take no flags 8 years ago
sha1.h Add crypt.[ch] and update md5sum and sha1sum 10 years ago
sha1sum.1 Use ISO-date-format in manpages 8 years ago
sha1sum.c No need for semicolon after ARGEND 8 years ago
sha224.h add sha224sum and sha384sum 7 years ago
sha224sum.1 add sha224sum and sha384sum 7 years ago
sha224sum.c add sha224sum and sha384sum 7 years ago
sha256.h Add sha256sum(1) 10 years ago
sha256sum.1 Use ISO-date-format in manpages 8 years ago
sha256sum.c No need for semicolon after ARGEND 8 years ago
sha384.h add sha224sum and sha384sum 7 years ago
sha384sum.1 add sha224sum and sha384sum 7 years ago
sha384sum.c add sha224sum and sha384sum 7 years ago
sha512-224.h add sha512-224sum (SHA512/224) and sha512-256sum (SHA512/256) 7 years ago
sha512-224sum.1 add sha512-224sum (SHA512/224) and sha512-256sum (SHA512/256) 7 years ago
sha512-224sum.c add sha512-224sum (SHA512/224) and sha512-256sum (SHA512/256) 7 years ago
sha512-256.h add sha512-224sum (SHA512/224) and sha512-256sum (SHA512/256) 7 years ago
sha512-256sum.1 add sha512-224sum (SHA512/224) and sha512-256sum (SHA512/256) 7 years ago
sha512-256sum.c add sha512-224sum (SHA512/224) and sha512-256sum (SHA512/256) 7 years ago
sha512.h Add sha512sum(1) 10 years ago
sha512sum.1 Use ISO-date-format in manpages 8 years ago
sha512sum.c No need for semicolon after ARGEND 8 years ago
sleep.1 Use ISO-date-format in manpages 8 years ago
sleep.c Do not use arg.h for tools which take no flags 8 years ago
sort.1 Forgot to bump date for sort(1) manpage 7 years ago
sort.c sort: Fix line comparison when col buffer contains data from longer line 7 years ago
split.1 Use ISO-date-format in manpages 8 years ago
split.c Fix type mismatch in split(1) 7 years ago
sponge.1 Use ISO-date-format in manpages 8 years ago
sponge.c Simplify return & fshut() logic 8 years ago
strings.1 Use ISO-date-format in manpages 8 years ago
strings.c No need for semicolon after ARGEND 8 years ago
sync.1 Use ISO-date-format in manpages 8 years ago
sync.c Do not use arg.h for tools which take no flags 8 years ago
tail.1 Use ISO-date-format in manpages 8 years ago
tail.c Support NUL containing lines in tail(1) 7 years ago
tar.1 tar: support -f - for stdin/out 7 years ago
tar.c tar: make remove(3) non-fatal when extracting 7 years ago
tee.1 Use ISO-date-format in manpages 8 years ago
tee.c tee: Make sure we continue on error 7 years ago
test.1 Update test.1: 7 years ago
test.c test: -erwx test against effetive uid/gid, not real 7 years ago
text.h Rename struct linebufline to struct line and add linecmp() 7 years ago
tftp.1 Use ISO-date-format in manpages 8 years ago
tftp.c Include sys/time.h for timeval structure 7 years ago
time.1 Use ISO-date-format in manpages 8 years ago
time.c Fix type mismatches 7 years ago
touch.1 Use ISO-date-format in manpages 8 years ago
touch.c touch: Avoid unnecessary call to stat 7 years ago
tr.1 tr.1: Make note of some changes in the utility 7 years ago
tr.c tr: Fix multiple ranges with different lengths (Michael Forney) 6 years ago
true.1 Use ISO-date-format in manpages 8 years ago
true.c Simplify true(1) and false(1) 9 years ago
tsort.1 tsort.1: use mandoc literal block for example 7 years ago
tsort.c tsort style fixes 7 years ago
tty.1 Use ISO-date-format in manpages 8 years ago
tty.c Do not use arg.h for tools which take no flags 8 years ago
uname.1 Use ISO-date-format in manpages 8 years ago
uname.c No need for semicolon after ARGEND 8 years ago
unexpand.1 Use ISO-date-format in manpages 8 years ago
unexpand.c No need for semicolon after ARGEND 8 years ago
uniq.1 Use ISO-date-format in manpages 8 years ago
uniq.c uniq: always store previous line length 7 years ago
unlink.1 Use ISO-date-format in manpages 8 years ago
unlink.c Do not use arg.h for tools which take no flags 8 years ago
utf.h Scrap chartorunearr(), introducing utftorunestr() 8 years ago
util.h Support NUL-containing lines in sort(1) 7 years ago
uudecode.1 Use ISO-date-format in manpages 8 years ago
uudecode.c Revert "fix length after '\' getline string termination" 7 years ago
uuencode.1 Use ISO-date-format in manpages 8 years ago
uuencode.c uuencode: style: just use pointer *b 7 years ago
wc.1 Use ISO-date-format in manpages 8 years ago
wc.c Fix wc(1) output for large files 7 years ago
which.1 Use ISO-date-format in manpages 8 years ago
which.c Cleanup usage() across sbase 7 years ago
whoami.1 Add whoami(1) 7 years ago
whoami.c Fix style issue in whoami which broke the sbase-box target 7 years ago
xargs.1 Use ISO-date-format in manpages 8 years ago
xargs.c Cleanup usage() across sbase 7 years ago
xinstall.1 Add missing .El to xinstall.1 7 years ago
xinstall.c install: Handle -c flag as a no-op 7 years ago
yes.1 Use ISO-date-format in manpages 8 years ago
yes.c Do not use arg.h for tools which take no flags 8 years ago

README

sbase - suckless unix tools

===========================

sbase is a collection of unix tools that are inherently portable
across UNIX and UNIX-like systems.

The following tools are implemented:

'#' -> UTF-8 support, '=' -> Implicit UTF-8 support, '*' -> Finished,
'|' -> Audited, 'o' -> POSIX 2013 compliant, 'x' -> Non-POSIX,
'0' -> NUL handling, '()' -> Petty flag

UTILITY MISSING
------- -------
0=*|o basename .
0=*|o cal .
0=*|o cat .
0=*|o chgrp .
0=*|o chmod .
0=*|o chown .
0=*|x chroot .
0=*|o cksum .
0=*|o cmp .
0#*|x cols .
0=*|o comm .
0=*|o cp (-i)
0=*|x cron .
0#*|o cut .
0=*|o date .
0=*|o dirname .
0=*|o du .
0=*|o echo .
o ed .
0=*|o env .
0#*|o expand .
0#*|o expr .
0=*|o false .
0= find .
0=* x flock .
0#*|o fold .
0=*|o getconf (-v)
=*|o grep .
0=*|o head .
0=*|x hostname .
0=*|x install .
0=* o join .
0=*|o kill .
0=*|o link .
0=*|o ln .
0=*|o logger .
0=*|o logname .
0#* o ls (-C, -k, -m, -p, -s, -x)
0=*|x md5sum .
0=*|o mkdir .
0=*|o mkfifo .
0=*|x mktemp .
0=*|o mv (-i)
0=*|o nice .
0#*|o nl .
0=*|o nohup .
0=*|o od .
0#* o pathchk .
#*|o paste .
0=*|x printenv .
0#*|o printf .
0=*|o pwd .
0=*|x readlink .
0=*|o renice .
0#* x rev .
0=*|o rm (-i)
0=*|o rmdir .
# sed .
0=*|x seq .
0=*|x setsid .
0=*|x sha1sum .
0=* x sha224sum .
0=*|x sha256sum .
0=* x sha238sum .
0=*|x sha512sum .
0=* x sha512-224sum .
0=* x sha512-256sum .
0=*|o sleep .
0#*|o sort .
0=*|o split .
0=*|x sponge .
0#*|o strings .
0=*|x sync .
0=*|o tail .
0=*|x tar .
0=*|o tee .
0=*|o test .
0=*|x tftp .
0=*|o time .
0=*|o touch .
0#*|o tr .
0=*|o true .
0=* o tsort .
0=*|o tty .
0=*|o uname .
0#*|o unexpand .
0=*|o uniq .
0=*|o unlink .
0=*|o uudecode .
0=*|o uuencode .
0#*|o wc .
0=*|x which .
0=*|x whoami .
0=*|o xargs (-p)
0=*|x yes .

The complement of sbase is ubase[1] which is Linux-specific and
provides all the non-portable tools. Together they are intended to
form a base system similar to busybox but much smaller and suckless.

Building
--------

To build sbase, simply type make. You may have to fiddle with
config.mk depending on your system.

You can also build sbase-box, which generates a single binary
containing all the required tools. You can then symlink the
individual tools to sbase-box or run: make sbase-box-install

Ideally you will want to statically link sbase. If you are on Linux
we recommend using musl-libc[2].

Portability
-----------

sbase has been compiled on a variety of different operating systems,
including Linux, *BSD, OSX, Haiku, Solaris, SCO OpenServer and others.

Various combinations of operating systems and architectures have also
been built.

You can build sbase with gcc, clang, tcc, nwcc and pcc.

[1] http://git.suckless.org/ubase/
[2] http://www.musl-libc.org/