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.
 
 
 
 
 
FRIGN e51a2e6d2f
Use ISO-date-format in manpages
8 years ago
libutf Add mkrunetype.awk 8 years ago
libutil Make strtol() parsing even stricter in parseoffset() 8 years ago
LICENSE Created od, with improvements suggested by FRIGN 8 years ago
Makefile Initial implementation of flock(1) 8 years ago
README Add flock entry in README 8 years ago
TODO Add getconf(1) 8 years ago
arg.h Add LNGARG() to sbase. 8 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 Add *fshut() functions to properly flush file streams 8 years ago
cat.1 Use ISO-date-format in manpages 8 years ago
cat.c Simplify return & fshut() logic 8 years ago
chgrp.1 Use ISO-date-format in manpages 8 years ago
chgrp.c Add maxdepth to recurse() 8 years ago
chmod.1 Use ISO-date-format in manpages 8 years ago
chmod.c Add maxdepth to recurse() 8 years ago
chown.1 Use ISO-date-format in manpages 8 years ago
chown.c Add maxdepth to recurse() 8 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 Simplify return & fshut() logic 8 years ago
cols.1 Use ISO-date-format in manpages 8 years ago
cols.c Simplify return & fshut() logic 8 years ago
comm.1 Use ISO-date-format in manpages 8 years ago
comm.c comm: Print first trailing unpaired line in file 1 8 years ago
compat.h Add compat.h 8 years ago
config.mk use CC for sbase-box, remove LD 8 years ago
cp.1 Use ISO-date-format in manpages 8 years ago
cp.c Add *fshut() functions to properly flush file streams 8 years ago
cron.1 Use ISO-date-format in manpages 8 years ago
cron.c Check getline()-return-values properly 8 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 Make fname static in cut() in cut(1) 8 years ago
date.1 Use ISO-date-format in manpages 8 years ago
date.c Add *fshut() functions to properly flush file streams 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 include stdint.h for SIZE_MAX 8 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
env.1 Use ISO-date-format in manpages 8 years ago
env.c env: Fix return value if the command could not be found 8 years ago
expand.1 Use ISO-date-format in manpages 8 years ago
expand.c Simplify return & fshut() logic 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: NULL terminate braces array in exec primary 8 years ago
flock.1 Use ISO-date-format in manpages 8 years ago
flock.c Include fcntl.h for open(2) 8 years ago
fold.1 Use ISO-date-format in manpages 8 years ago
fold.c Simplify return & fshut() logic 8 years ago
fs.h Add SILENT flag to recurse() 8 years ago
getconf.1 Use ISO-date-format in manpages 8 years ago
getconf.c Prepend "usage: " in usage() 8 years ago
grep.1 Use ISO-date-format in manpages 8 years ago
grep.c Simplify return & fshut() logic 8 years ago
head.1 Use ISO-date-format in manpages 8 years ago
head.c Simplify return & fshut() logic 8 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 join: Use LIMIT macro 8 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: allow dangling symlinks 8 years ago
logger.1 Use ISO-date-format in manpages 8 years ago
logger.c Add *fshut() functions to properly flush file streams 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: handle character/block files in long format 8 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 Simplify return & fshut() logic 8 years ago
mkdir.1 Use ISO-date-format in manpages 8 years ago
mkdir.c Move mkdirp() to libutil 8 years ago
mkfifo.1 Use ISO-date-format in manpages 8 years ago
mkfifo.c Audit mkfifo(1) 8 years ago
mktemp.1 Use ISO-date-format in manpages 8 years ago
mktemp.c mktemp improvements 8 years ago
mv.1 Use ISO-date-format in manpages 8 years ago
mv.c Add maxdepth to recurse() 8 years ago
nice.1 Use ISO-date-format in manpages 8 years ago
nice.c Don't return but _exit after failed exec*() and fork() 8 years ago
nl.1 Use ISO-date-format in manpages 8 years ago
nl.c Simplify return & fshut() logic 8 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 Use ISO-date-format in manpages 8 years ago
od.c Match \v as escaped character 8 years ago
paste.1 Use ISO-date-format in manpages 8 years ago
paste.c Simplify return & fshut() logic 8 years ago
printenv.1 Use ISO-date-format in manpages 8 years ago
printenv.c Do not use arg.h for tools which take no flags 8 years ago
printf.1 Use ISO-date-format in manpages 8 years ago
printf.c Remove debug-code in printf(1) 8 years ago
pwd.1 Use ISO-date-format in manpages 8 years ago
pwd.c Add *fshut() functions to properly flush file streams 8 years ago
queue.h Use queue.h in grep(1) 8 years ago
readlink.1 Use ISO-date-format in manpages 8 years ago
readlink.c readlink: simplify -f 8 years ago
renice.1 Use ISO-date-format in manpages 8 years ago
renice.c Audit renice(1) 8 years ago
rm.1 Use ISO-date-format in manpages 8 years ago
rm.c Add SILENT flag to recurse() 8 years ago
rmdir.1 Use ISO-date-format in manpages 8 years ago
rmdir.c Add argv0 to usage() in rmdir.c 8 years ago
sed.1 Use ISO-date-format in manpages 8 years ago
sed.c ls: printf("%s", s) -> fputs(s, stdout) 8 years ago
seq.1 Use ISO-date-format in manpages 8 years ago
seq.c Add *fshut() functions to properly flush file streams 8 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 Simplify return & fshut() logic 8 years ago
sha256.h Add sha256sum(1) 10 years ago
sha256sum.1 Use ISO-date-format in manpages 8 years ago
sha256sum.c Simplify return & fshut() logic 8 years ago
sha512.h Add sha512sum(1) 10 years ago
sha512sum.1 Use ISO-date-format in manpages 8 years ago
sha512sum.c Simplify return & fshut() logic 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 Use ISO-date-format in manpages 8 years ago
sort.c Audit sort(1) and mark it as finished 8 years ago
split.1 Use ISO-date-format in manpages 8 years ago
split.c Print error message when size == 0 in split(1) 8 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 Simplify return & fshut() logic 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 tail: Don't print garbage when input contains no newlines. 8 years ago
tar.1 Use ISO-date-format in manpages 8 years ago
tar.c Stop defining major()/minor() and makedev() 8 years ago
tee.1 Use ISO-date-format in manpages 8 years ago
tee.c Simplify return & fshut() logic 8 years ago
test.1 Use ISO-date-format in manpages 8 years ago
test.c Audit test(1) 8 years ago
text.h Use size_t for number of lines in linebuf 8 years ago
tftp.1 Use ISO-date-format in manpages 8 years ago
tftp.c Add TFTP client as specified by RFC 1350 8 years ago
time.1 Use ISO-date-format in manpages 8 years ago
time.c fork: no need to _exit() on the error case 8 years ago
touch.1 Use ISO-date-format in manpages 8 years ago
touch.c touch: Use both atime and mtime of reference file 8 years ago
tr.1 Use ISO-date-format in manpages 8 years ago
tr.c Simplify return & fshut() logic 8 years ago
true.1 Use ISO-date-format in manpages 8 years ago
true.c Simplify true(1) and false(1) 9 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 Update putword() to accept a FILE * 8 years ago
unexpand.1 Use ISO-date-format in manpages 8 years ago
unexpand.c Simplify return & fshut() logic 8 years ago
uniq.1 Use ISO-date-format in manpages 8 years ago
uniq.c Simplify return & fshut() logic 8 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 Add parseoffset() 8 years ago
uudecode.1 Use ISO-date-format in manpages 8 years ago
uudecode.c Simplify return & fshut() logic 8 years ago
uuencode.1 Use ISO-date-format in manpages 8 years ago
uuencode.c Simplify return & fshut() logic 8 years ago
wc.1 Use ISO-date-format in manpages 8 years ago
wc.c Simplify return & fshut() logic 8 years ago
which.1 Use ISO-date-format in manpages 8 years ago
which.c which: Add LICENSE header 8 years ago
xargs.1 Use ISO-date-format in manpages 8 years ago
xargs.c Simplify return & fshut() logic 8 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,
'()' -> Petty flag

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