[hackers] [sbase] Adding some utilities. || Christoph Lohmann

From: <git_AT_suckless.org>
Date: Thu, 30 May 2013 21:31:53 +0200

commit 2c162042b14ed36f58b705fa885c05f36d7bf712
Author: Christoph Lohmann <20h_AT_r-36.net>
Date: Thu May 30 21:29:56 2013 +0200

    Adding some utilities.
    
    Thanks "Galos, David" <galosd83_AT_students.rowan.edu>!

diff --git a/Makefile b/Makefile
index bef596f..d90d690 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -22,8 +22,10 @@ LIB = \
 SRC = \
         basename.c \
         cat.c \
+ chgrp.c \
         chmod.c \
         chown.c \
+ chvt.c \
         cksum.c \
         cmp.c \
         cp.c \
_AT_@ -45,10 +47,13 @@ SRC = \
         nl.c \
         nohup.c \
         paste.c \
+ printenv.c \
         pwd.c \
         rm.c \
+ rmdir.c \
         sleep.c \
         sort.c \
+ sync.c \
         tail.c \
         tee.c \
         test.c \
_AT_@ -57,6 +62,7 @@ SRC = \
         tty.c \
         uname.c \
         uniq.c \
+ unlink.c \
         seq.c \
         wc.c \
         yes.c
diff --git a/TODO b/TODO
index d6b9e0b..217829f 100644
--- a/TODO
+++ b/TODO
_AT_@ -1,9 +1,5 @@
 cal [-1] [-3] [-y] [year]
 
-chgrp [-R] groupname file...
-
-chvt N
-
 comm [-123] file1 file2
 
 cut [-bcfs] [-d delim] list [file...]
_AT_@ -26,33 +22,23 @@ id [-ruGgn] username
 
 md5sum [-c] [file...]
 
-nice [-n N] [command]
-
-printenv [variable...]
-
 printf [format] [data...]
 
 printf format [argument...]
 
 readlink [-fem] file
 
-rmdir [directory...]
-
 seq [-s string] [N [N]] N
 
 sha1sum [-c] [file...]
 
 split [-a N] [-b N] [-l N] [input [prefix]]
 
-sync
-
 test [expression...]
 
 tr string1 [string2]
 
 unexpand [-a] [-t N] [file...]
 
-unlink file
-
 who
 
diff --git a/chgrp.1 b/chgrp.1
new file mode 100644
index 0000000..7196080
--- /dev/null
+++ b/chgrp.1
_AT_@ -0,0 +1,22 @@
+.TH CHGRP 1 sbase\-VERSION
+.SH NAME
+nice \- invoke a utility with an altered nice value
+.SH SYNOPSIS
+.B chgrp
+.RB [ \-R ]
+.I groupname
+.I file...
+.SH DESCRIPTION
+.B chgrp
+sets the group id of the files specified by
+.IR file
+to the gid of the group named
+.IR group.
+If the
+.IR R
+flag is specified, this process is recursively applied to
+everything in
+.IR file.
+
+.SH SEE ALSO
+.IR chown (1) chown (2) chmod (1) chmod (2) getgrnam (3)
diff --git a/chvt.1 b/chvt.1
new file mode 100644
index 0000000..13a9be3
--- /dev/null
+++ b/chvt.1
_AT_@ -0,0 +1,11 @@
+.TH CHVT 1 sbase\-VERSION
+.SH NAME
+chvt \- change foreground virtual terminal
+.SH SYNOPSIS
+.B chvt
+.I N
+.SH DESCRIPTION
+.B chvt
+brings /dev/ttyN to the foreground. This has the
+same effect as Ctrl-Alt-FN.
+
diff --git a/nice.1 b/nice.1
new file mode 100644
index 0000000..0803461
--- /dev/null
+++ b/nice.1
_AT_@ -0,0 +1,18 @@
+.TH NICE 1 sbase\-VERSION
+.SH NAME
+nice \- invoke a utility with an altered nice value
+.SH SYNOPSIS
+.B nice
+.RB [ \-n inc ]
+.I command
+.RI [ options ...]
+.SH DESCRIPTION
+.B nice
+invokes
+.IR command
+with a nice value equal to the current nice value plus
+.IR inc,
+which defaults to 10 if unspecified.
+
+.SH SEE ALSO
+.IR renice (1) nice (2)
diff --git a/printenv.1 b/printenv.1
new file mode 100644
index 0000000..4b42e40
--- /dev/null
+++ b/printenv.1
_AT_@ -0,0 +1,19 @@
+.TH PRINTENV 1 sbase\-VERSION
+.SH NAME
+printenv \- print out the environment or the values of specific variables.
+.SH SYNOPSIS
+.B printenv
+.RB [ var... ]
+.SH DESCRIPTION
+.B printenv
+prints the entire environment as key=values pairs when
+no
+.IR var
+is specified. Otherwise, in the order specified,
+.B printenv
+prints the value only of each
+.IR var,
+one per line.
+
+.SH SEE ALSO
+.IR env (1)
diff --git a/rmdir.1 b/rmdir.1
new file mode 100644
index 0000000..db8411e
--- /dev/null
+++ b/rmdir.1
_AT_@ -0,0 +1,25 @@
+.TH RMDIR 1 sbase\-VERSION
+.SH NAME
+rmdir \- remove a directory
+.SH SYNOPSIS
+.B rmdir
+.I directory...
+.SH DESCRIPTION
+.B rmdir
+attempts to remove all non-full directories specified
+by
+.IR directory.
+.SH BUGS
+Subdirectories are removed in the order specified, so
+.nf
+ rmdir foo/bar foo
+.fi
+will be successful, but
+.nf
+ rmdir foo foo/bar
+.fi
+will only succeed in removing
+.BR foo/bar.
+
+.SH SEE ALSO
+.IR rm (1) rmdir (2) unlink (1) unlink (2)
diff --git a/sync.1 b/sync.1
new file mode 100644
index 0000000..efd4798
--- /dev/null
+++ b/sync.1
_AT_@ -0,0 +1,14 @@
+.TH SYNC 1 sbase\-VERSION
+.SH NAME
+sync \- flush disk cache
+.SH SYNOPSIS
+.B sync
+.SH DESCRIPTION
+.B sync
+invokes
+.IR sync(2)
+to flush all unwritten changes to the disk. This is
+usually done before shutting down, rebooting or halting.
+
+.SH SEE ALSO
+.IR sync (2) fsync (2)
diff --git a/unlink.1 b/unlink.1
new file mode 100644
index 0000000..fcc84fe
--- /dev/null
+++ b/unlink.1
_AT_@ -0,0 +1,16 @@
+.TH UNLINK 1 sbase\-VERSION
+.SH NAME
+unlink \- call the unlink function
+.SH SYNOPSIS
+.B unlink
+.RB file
+.SH DESCRIPTION
+.B unlink
+calls the
+.IR unlink
+function on
+.IR file.
+
+
+.SH SEE ALSO
+.IR unlink (2)
Received on Thu May 30 2013 - 21:31:53 CEST

This archive was generated by hypermail 2.3.0 : Thu May 30 2013 - 21:36:24 CEST