diff options
author | Wen Heping <wen@FreeBSD.org> | 2010-03-13 12:41:14 +0000 |
---|---|---|
committer | Wen Heping <wen@FreeBSD.org> | 2010-03-13 12:41:14 +0000 |
commit | fea59376f906b43968dc51cf6ad3707cb058faaa (patch) | |
tree | 947388cdcdd7d527250614416eaf3e68b1e128e1 | |
parent | 35da9b1ff3684f296e6932d231349f4089def737 (diff) | |
download | ports-fea59376f906b43968dc51cf6ad3707cb058faaa.tar.gz ports-fea59376f906b43968dc51cf6ad3707cb058faaa.zip |
Notes
-rw-r--r-- | sysutils/moreutils/Makefile | 22 | ||||
-rw-r--r-- | sysutils/moreutils/distinfo | 6 | ||||
-rw-r--r-- | sysutils/moreutils/files/ifne.1 | 44 | ||||
-rw-r--r-- | sysutils/moreutils/files/isutf8.1 | 41 | ||||
-rw-r--r-- | sysutils/moreutils/files/lckdo.1 | 66 | ||||
-rw-r--r-- | sysutils/moreutils/files/mispipe.1 | 35 | ||||
-rw-r--r-- | sysutils/moreutils/files/parallel.1 | 105 | ||||
-rw-r--r-- | sysutils/moreutils/files/pee.1 | 32 | ||||
-rw-r--r-- | sysutils/moreutils/files/sponge.1 | 30 |
9 files changed, 367 insertions, 14 deletions
diff --git a/sysutils/moreutils/Makefile b/sysutils/moreutils/Makefile index 5a74336b5969..126902fccb28 100644 --- a/sysutils/moreutils/Makefile +++ b/sysutils/moreutils/Makefile @@ -7,7 +7,7 @@ # PORTNAME= moreutils -PORTVERSION= 0.38 +PORTVERSION= 0.39 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_DEBIAN_POOL} DISTNAME= ${PORTNAME}_${PORTVERSION} @@ -15,12 +15,6 @@ DISTNAME= ${PORTNAME}_${PORTVERSION} MAINTAINER= corky1951@comcast.net COMMENT= Additional Unix utilities -.if !defined(NO_INSTALL_MANPAGES) -BUILD_DEPENDS= libxslt>=0:${PORTSDIR}/textproc/libxslt \ - ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl \ - ${LOCALBASE}/share/xml/docbook/4.4/docbookx.dtd:${PORTSDIR}/textproc/docbook-xml-440 -.endif - USE_PERL5= yes PLIST_FILES= bin/combine \ @@ -59,12 +53,18 @@ MAN1= combine.1 \ ALL_TARGET+= mans extraman MANCOMPRESSED= no -# portlint will warn about the next line, but we need it this way -OLD_DTD= /usr/share/xml/docbook/schema/dtd/4.4/docbookx.dtd -NEW_DTD= ${LOCALBASE}/share/xml/docbook/4.4/docbookx.dtd +CANNED_MAN= ifne.1 \ + isutf8.1 \ + lckdo.1 \ + mispipe.1 \ + parallel.1 \ + pee.1 \ + sponge.1 post-patch: - ${REINPLACE_CMD} -E -e 's|${OLD_DTD}|${NEW_DTD}|g' ${WRKSRC}/*.docbook +.for f in ${CANNED_MAN} + ${CP} ${FILESDIR}/${f} ${WRKSRC} +.endfor post-install: .for manpage in ${MAN1} diff --git a/sysutils/moreutils/distinfo b/sysutils/moreutils/distinfo index d85745f2a3a0..07727d1bf00d 100644 --- a/sysutils/moreutils/distinfo +++ b/sysutils/moreutils/distinfo @@ -1,3 +1,3 @@ -MD5 (moreutils_0.38.tar.gz) = 34f29dc728ead3cae50411e7d158a493 -SHA256 (moreutils_0.38.tar.gz) = 26223e8ac1fe9906dcc0e2e4395d510146001fe285e9f786e80daab8acb237c3 -SIZE (moreutils_0.38.tar.gz) = 40426 +MD5 (moreutils_0.39.tar.gz) = 73477f418ea2de81a045019cc71267f3 +SHA256 (moreutils_0.39.tar.gz) = 6c982ed4c863f385da1ec9f90665cb9000c84f59b56340ca0832fea2d4b8bb98 +SIZE (moreutils_0.39.tar.gz) = 40591 diff --git a/sysutils/moreutils/files/ifne.1 b/sysutils/moreutils/files/ifne.1 new file mode 100644 index 000000000000..4d530760fec3 --- /dev/null +++ b/sysutils/moreutils/files/ifne.1 @@ -0,0 +1,44 @@ +.\" -*- coding: us-ascii -*- +.if \n(.g .ds T< \\FC +.if \n(.g .ds T> \\F[\n[.fam]] +.de URL +\\$2 \(la\\$1\(ra\\$3 +.. +.if \n(.g .mso www.tmac +.TH ifne 1 2008-05-01 "" "" +.SH NAME +ifne \- Run command if the standard input is not empty +.SH SYNOPSIS +'nh +.fi +.ad l +\fBifne [-n] command\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +'in \n(.iu-\nxu +.ad b +'hy +.SH DESCRIPTION +\fBifne\fR runs the following command if and only if +the standard input is not empty. +.SH OPTIONS +.TP +\*(T<\fB\-n\fR\*(T> +Reverse operation. Run the command if the standard input is empty. + +Note that if the standard input is not empty, it is passed through ifne +in this case. +.SH EXAMPLE +'nh +.fi +.ad l +\fBfind . -name core | ifne mail -s "Core files found" root\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +'in \n(.iu-\nxu +.ad b +'hy +.SH AUTHOR +Copyright 2008 by Javier Merino <cibervicho@gmail.com> +.PP +Licensed under the GNU GPL diff --git a/sysutils/moreutils/files/isutf8.1 b/sysutils/moreutils/files/isutf8.1 new file mode 100644 index 000000000000..14444ebce069 --- /dev/null +++ b/sysutils/moreutils/files/isutf8.1 @@ -0,0 +1,41 @@ +.\" -*- coding: us-ascii -*- +.if \n(.g .ds T< \\FC +.if \n(.g .ds T> \\F[\n[.fam]] +.de URL +\\$2 \(la\\$1\(ra\\$3 +.. +.if \n(.g .mso www.tmac +.TH isutf8 1 2006-02-19 "" "" +.SH NAME +isutf8 \- check whether files are valid UTF-8 +.SH SYNOPSIS +'nh +.fi +.ad l +\fBisutf8\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[\fB-hq\fR] [\fB--help\fR] [\fB--quiet\fR] [\fIfile\fR\&...] +'in \n(.iu-\nxu +.ad b +'hy +.SH DESCRIPTION +\fBisutf8\fR checks whether files are +syntactically valid UTF-8. Input is either files named on the +command line, or the standard input. Notices about files with +invalid UTF-8 are printed to standard output. +.SH OPTIONS +.TP +\*(T<\fB\-h\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> +Print out a help summary. +.TP +\*(T<\fB\-q\fR\*(T>, \*(T<\fB\-\-quiet\fR\*(T> +Don't print messages telling which files are +invalid UTF-8, merely indicate it with the exit +status. +.SH "EXIT STATUS" +If the file is valid UTF-8, the exit status is zero. +If the file is not valid UTF-8, or there is some +error, the exit status is non-zero. +.SH "SEE ALSO" +\fButf8\fR(7) diff --git a/sysutils/moreutils/files/lckdo.1 b/sysutils/moreutils/files/lckdo.1 new file mode 100644 index 000000000000..dd3bcf3ae4e7 --- /dev/null +++ b/sysutils/moreutils/files/lckdo.1 @@ -0,0 +1,66 @@ +.\" -*- coding: us-ascii -*- +.if \n(.g .ds T< \\FC +.if \n(.g .ds T> \\F[\n[.fam]] +.de URL +\\$2 \(la\\$1\(ra\\$3 +.. +.if \n(.g .mso www.tmac +.TH lckdo 1 2007-08-15 "" "" +.SH NAME +lckdo \- run a program with a lock held +.SH SYNOPSIS +'nh +.fi +.ad l +\fBlckdo\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[options] {lockfile} {program} [arguments] +'in \n(.iu-\nxu +.ad b +'hy +.SH DESCRIPTION +\fBlckdo\fR runs a program with a lock +held, in order to prevent multiple processes from running in +parallel. Use just like \fBnice\fR or +\fBnohup\fR. +.SH OPTIONS +.TP +\*(T<\fB\-w\fR\*(T> +If the lock is already held by another process, +wait for it to complete instead of failing +immediately. +.TP +\*(T<\fB\-W {sec}\fR\*(T> +The same as -w but wait not more than sec +seconds. +.TP +\*(T<\fB\-e\fR\*(T> +Execute the program directly without forking and +waiting (keeps an extra file descriptor open). +.TP +\*(T<\fB\-E {nnn}\fR\*(T> +Set the file descriptor number to keep open when +exec()ing (implies -e). +.TP +\*(T<\fB\-n\fR\*(T> +Do not create the lock file if it does not +exist. +.TP +\*(T<\fB\-q\fR\*(T> +Produce no output if lock is already held. +.TP +\*(T<\fB\-s\fR\*(T> +Lock in shared (read) mode. +.TP +\*(T<\fB\-x\fR\*(T> +Lock in exclusive (write) mode (default). +.TP +\*(T<\fB\-t\fR\*(T> +Test for lock existence. +.SH "EXIT STATUS" +If the lock was successfully acquired, the return value is that +of the program invoked by \fBlckdo\fR. If the lock +couldn't be acquired, EX_TEMPFAIL is returned. If there was a problem +opening/creating or locking the lock file, EX_CANTCREAT or EX_OSERR +will be returned. diff --git a/sysutils/moreutils/files/mispipe.1 b/sysutils/moreutils/files/mispipe.1 new file mode 100644 index 000000000000..9dffea94178e --- /dev/null +++ b/sysutils/moreutils/files/mispipe.1 @@ -0,0 +1,35 @@ +.\" -*- coding: us-ascii -*- +.if \n(.g .ds T< \\FC +.if \n(.g .ds T> \\F[\n[.fam]] +.de URL +\\$2 \(la\\$1\(ra\\$3 +.. +.if \n(.g .mso www.tmac +.TH mispipe 1 2006-09-07 "" "" +.SH NAME +mispipe \- pipe two commands, returning the exit status of the first +.SH SYNOPSIS +'nh +.fi +.ad l +\fBmispipe\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[\fI"command1"\fR] [\fI"command2"\fR] +'in \n(.iu-\nxu +.ad b +'hy +.SH DESCRIPTION +\fBmispipe\fR pipes two commands +together like the shell does, but unlike piping in the +shell, the exit status of the first command is returned. +.PP +Note that some shells, notably \fBbash\fR, +do offer a pipefail option, however, that option does not +behave the same since it makes a failure of any command in +the pipeline be returned, not just the exit status of the +first. +.SH "EXIT STATUS" +The exit status of the first command. If the process +terminated abnormally (due to a signal), 128 will be added +to its exit status. diff --git a/sysutils/moreutils/files/parallel.1 b/sysutils/moreutils/files/parallel.1 new file mode 100644 index 000000000000..a206a8b0640d --- /dev/null +++ b/sysutils/moreutils/files/parallel.1 @@ -0,0 +1,105 @@ +.\" -*- coding: us-ascii -*- +.if \n(.g .ds T< \\FC +.if \n(.g .ds T> \\F[\n[.fam]] +.de URL +\\$2 \(la\\$1\(ra\\$3 +.. +.if \n(.g .mso www.tmac +.TH parallel 1 2009-07-02 "" "" +.SH NAME +parallel \- run programs in parallel +.SH SYNOPSIS +'nh +.fi +.ad l +\fBparallel\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[options] [command] \fB--\fR [argument ...] +'in \n(.iu-\nxu +.ad b +'hy +'nh +.fi +.ad l +\fBparallel\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[options] \fB--\fR [command ...] +'in \n(.iu-\nxu +.ad b +'hy +.SH DESCRIPTION +\fBparallel\fR runs the specified command, +passing it a single one of the specified arguments. This is +repeated for each argument. Jobs may be run in +parallel. The default is to run one job per CPU. +.PP +If no command is specified before the --, +the commands after it are instead run in parallel. +.SH OPTIONS +.TP +\*(T<\fB\-j maxjobs\fR\*(T> +Use to limit the number of jobs +that are run at the same time. +.TP +\*(T<\fB\-l maxload\fR\*(T> +Avoid starting new jobs when +the system's load average is not below +the specified limit. +.TP +\*(T<\fB\-i\fR\*(T> +Normally the command is passed the +argument at the end of its command line. With +this option, the first instance of "{}" in +the command is replaced with the argument. +.TP +\*(T<\fB\-n\fR\*(T> +Number of arguments to pass to a +command at a time. Default is 1. +Incompatible with -i +.SH EXAMPLE +'nh +.fi +.ad l +\fBparallel sh -c "echo hi; sleep 2; echo bye" -- 1 2 3\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +'in \n(.iu-\nxu +.ad b +'hy +.PP +This runs three subshells that each print a message, delay, +and print another message. If your system has multiple +CPUs, parallel will run some of the jobs in parallel, +which should be clear from the order the messages are +output. +.PP +'nh +.fi +.ad l +\fBparallel -j 3 ufraw -o processed -- *.NEF\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +'in \n(.iu-\nxu +.ad b +'hy +.PP +This runs three ufraw processes at the same time until +all of the NEF files have been processed. +.PP +'nh +.fi +.ad l +\fBparallel -j 3 -- ls df "echo hi"\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +'in \n(.iu-\nxu +.ad b +'hy +.PP +This runs three independent commands in parallel. +.SH "EXIT STATUS" +Its exit status is the combination of the exit statuses of each +command ran, ORed together. (Thus, if any one command +exits nonzero, \fBparallel\fR as a whole will exit nonzero.) diff --git a/sysutils/moreutils/files/pee.1 b/sysutils/moreutils/files/pee.1 new file mode 100644 index 000000000000..ce3dfacc4d61 --- /dev/null +++ b/sysutils/moreutils/files/pee.1 @@ -0,0 +1,32 @@ +.\" -*- coding: us-ascii -*- +.if \n(.g .ds T< \\FC +.if \n(.g .ds T> \\F[\n[.fam]] +.de URL +\\$2 \(la\\$1\(ra\\$3 +.. +.if \n(.g .mso www.tmac +.TH pee 1 2006-03-14 "" "" +.SH NAME +pee \- tee standard input to pipes +.SH SYNOPSIS +'nh +.fi +.ad l +\fBpee\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[\fI"command"\fR\&...] +'in \n(.iu-\nxu +.ad b +'hy +.SH DESCRIPTION +\fBpee\fR is like \fBtee\fR +but for pipes. Each command is run and fed a copy of the +standard input. The output of all commands is sent to +stdout. +.PP +Note that while this is similar to +\fBtee\fR, a copy of the input is not sent +to stdout, like tee does. +.SH "SEE ALSO" +\fBtee\fR(1) diff --git a/sysutils/moreutils/files/sponge.1 b/sysutils/moreutils/files/sponge.1 new file mode 100644 index 000000000000..b3222752313b --- /dev/null +++ b/sysutils/moreutils/files/sponge.1 @@ -0,0 +1,30 @@ +.\" -*- coding: us-ascii -*- +.if \n(.g .ds T< \\FC +.if \n(.g .ds T> \\F[\n[.fam]] +.de URL +\\$2 \(la\\$1\(ra\\$3 +.. +.if \n(.g .mso www.tmac +.TH sponge 1 2006-02-19 "" "" +.SH NAME +sponge \- soak up standard input and write to a file +.SH SYNOPSIS +'nh +.fi +.ad l +\fBsed '...' file | grep '...' | sponge file\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +'in \n(.iu-\nxu +.ad b +'hy +.SH DESCRIPTION +\fBsponge\fR reads standard input and +writes it out to the specified file. Unlike a shell +redirect, sponge soaks up all its input before +opening the output file. This allows constricting +pipelines that read from and write to +the same file. +.PP +If no output file is specified, sponge outputs to +stdout. |