Mirror of Suckless' sbase (git://git.suckless.org/sbase)
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Roberto E. Vargas Caballero f45156d5b4 Simplify expression in makeline()
This expression was wrong, but it was causing a false positive
in some compilers that couldn't see that error() cannot return.
The actual problem of the line is that it was too complex and it is better
to split it in simplex expressions.
5 years ago
libutf Add mkrunetype.awk 8 years ago
libutil libutil/recurse: only opendir if recursing 6 years ago
LICENSE ed: Don't match against line 0 in search() 7 years ago
Makefile Add missing getconf.h dependency to sbase-box 6 years ago
README Add rev(1) 7 years ago
TODO Add a TODO-note about crypt.c 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 Handle { NULL } argv[] properly in manual arg-reduction 6 years ago
cal.1 Use ISO-date-format in manpages 8 years ago
cal.c cal: Highlight current day 8 years ago
cat.1 Use ISO-date-format in manpages 8 years ago
cat.c concat: Use plain read/write instead of buffered stdio 6 years ago
chgrp.1 Use ISO-date-format in manpages 8 years ago
chgrp.c Remove st != NULL checks from recursor functions 6 years ago
chmod.1 Use ISO-date-format in manpages 8 years ago
chmod.c chmod: Use DIRFIRST 6 years ago
chown.1 chown: fix user:group option parsing 8 years ago
chown.c Remove st != NULL checks from recursor functions 6 years ago
chroot.1 Use ISO-date-format in manpages 8 years ago
chroot.c Handle { NULL } argv[] properly in manual arg-reduction 6 years ago
cksum.1 Use ISO-date-format in manpages 8 years ago
cksum.c Handle { NULL } argv[] properly in manual arg-reduction 6 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 9 years ago
config.mk Use -D_FILE_OFFSET_BITS=64 by default 8 years ago
cp.1 cp.1: source and dest are not optional 6 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 8 years ago
crypt.h Don't use buffered IO (fread) when not appropriate 6 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 date: add date/time setting capability 6 years ago
date.c date: add date/time setting capability 6 years ago
dirname.1 Use ISO-date-format in manpages 8 years ago
dirname.c Handle { NULL } argv[] properly in manual arg-reduction 6 years ago
du.1 Use ISO-date-format in manpages 8 years ago
du.c du: Don't print 0 entry if stat of named file fails 6 years ago
echo.1 Use ISO-date-format in manpages 8 years ago
echo.c Handle { NULL } argv[] properly in manual arg-reduction 6 years ago
ed.1 ed: add manpage 7 years ago
ed.c Simplify expression in makeline() 5 years ago
env.1 Use ISO-date-format in manpages 8 years ago
env.c env: Check unsetenv() return value 8 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 Handle { NULL } argv[] properly in manual arg-reduction 6 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: remove VLAs 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 8 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: Report invalid variables as errors 6 years ago
getconf.c getconf: Ensure output was written successfully 6 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 Handle { NULL } argv[] properly in manual arg-reduction 6 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 Handle { NULL } argv[] properly in manual arg-reduction 6 years ago
link.1 Use ISO-date-format in manpages 8 years ago
link.c Handle { NULL } argv[] properly in manual arg-reduction 6 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 Handle { NULL } argv[] properly in manual arg-reduction 6 years ago
ls.1 Use ISO-date-format in manpages 8 years ago
ls.c ls: abort a directory if we cannot opendir it 6 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 mkdir: Fix created directory permissions 6 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 8 years ago
nice.1 Use ISO-date-format in manpages 8 years ago
nice.c Check if PRIO_MIN and PRIO_MAX are defined 8 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 Handle { NULL } argv[] properly in manual arg-reduction 6 years ago
od.1 od: Add some missing type flags 7 years ago
od.c od: For the 'c' type, format non-printable charecters as octal 5 years ago
paste.1 Use ISO-date-format in manpages 8 years ago
paste.c Fix segmentation fault in paste(1) 6 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 Handle { NULL } argv[] properly in manual arg-reduction 6 years ago
printf.1 Change the note in printf.1 on octal escapes 7 years ago
printf.c printf: handle \0 in %b arguments 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) 9 years ago
readlink.1 readlink: Remove broken support for -m and -e 8 years ago
readlink.c readlink: Remove broken support for -m and -e 8 years ago
renice.1 Use ISO-date-format in manpages 8 years ago
renice.c Cleanup usage() across sbase 8 years ago
rev.1 Add rev(1) 7 years ago
rev.c Add rev(1) 7 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 sed: Fix parsing bug in find_delim 6 years ago
seq.1 Use ISO-date-format in manpages 8 years ago
seq.c Cleanup usage() across sbase 8 years ago
setsid.1 Use ISO-date-format in manpages 8 years ago
setsid.c Handle { NULL } argv[] properly in manual arg-reduction 6 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 Handle { NULL } argv[] properly in manual arg-reduction 6 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) 8 years ago
sponge.1 Use ISO-date-format in manpages 8 years ago
sponge.c Handle { NULL } argv[] properly in manual arg-reduction 6 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 Handle { NULL } argv[] properly in manual arg-reduction 6 years ago
tail.1 tail: Process bytes with -c option, and add -m option for runes 6 years ago
tail.c tail: Process bytes with -c option, and add -m option for runes 6 years ago
tar.1 tar: support -f - for stdin/out 7 years ago
tar.c tar: Fix a few weprintf/eprintf format strings 6 years ago
tee.1 Use ISO-date-format in manpages 8 years ago
tee.c Don't use buffered IO (fread) when not appropriate 6 years ago
test.1 Update test.1: 7 years ago
test.c Handle { NULL } argv[] properly in manual arg-reduction 6 years ago
text.h concat: Use plain read/write instead of buffered stdio 6 years ago
tftp.1 Use ISO-date-format in manpages 8 years ago
tftp.c Include sys/time.h for timeval structure 8 years ago
time.1 Use ISO-date-format in manpages 8 years ago
time.c Fix type mismatches 8 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 infinite loop 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 Handle { NULL } argv[] properly in manual arg-reduction 6 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 Handle { NULL } argv[] properly in manual arg-reduction 6 years ago
utf.h Scrap chartorunearr(), introducing utftorunestr() 8 years ago
util.h concat: Use plain read/write instead of buffered stdio 6 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 which: Minor simplification 6 years ago
whoami.1 Add whoami(1) 8 years ago
whoami.c Handle { NULL } argv[] properly in manual arg-reduction 6 years ago
xargs.1 Use ISO-date-format in manpages 8 years ago
xargs.c Cleanup usage() across sbase 8 years ago
xinstall.1 install: ignore -s 7 years ago
xinstall.c concat: Use plain read/write instead of buffered stdio 6 years ago
yes.1 Use ISO-date-format in manpages 8 years ago
yes.c Handle { NULL } argv[] properly in manual arg-reduction 6 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/