path: root/bin
AgeCommit message (Collapse)AuthorFilesLines
2017-11-10Fix oii(1df) so it works as a pipeTom Ryder1-6/+7
I realised I could make this work by recording a single byte in the temporary file with dd(1) and then emitting that and then the rest of the input with cat(1) if the file ended up with a byte in it. This lets me remove the CAVEATS section from the manual, as it no longer applies.
2017-11-03Merge branch 'feature/d2u-u2d-con...' into developTom Ryder2-3/+2
* feature/d2u-u2d-consist: Make d2u(1df)/u2d(1df) like their stream analogues
2017-11-03Make d2u(1df)/u2d(1df) like their stream analoguesTom Ryder2-3/+2
Remove the idempotency guarantee, and simplify the ed(1) scripts. See commits 2905980 and cd8e9cc: >commit 29059804f7708413843687c1764bc845d374a82d >Author: Tom Ryder <tom@sanctum.geek.nz> >Date: Fri Nov 3 13:58:23 2017 > > Remove idempotency assert for sd2u(1df)/su2d(1df) > > Commit cd8e9cc applies a cleaner implementation of these tools but > loses the idempotency: > > * Repeated su2d applications will result in double \r, so \r\r\n > * Repeated s2ru applications will result in an extra newline at the > end of the file, because the whole file will be interpreted as > one line > > However, I am OK with this, as I think of the operation as simpler > and more predictable, and I wouldn't apply it as a means to "force" > a file of unknown or various line-ending types to one type. > >commit cd8e9cc27f7dd9d360b64f4a34b8c2d048f42e45 >Author: Tom Ryder <tom@sanctum.geek.nz> >Date: Fri Nov 3 13:46:30 2017 > > Apply simpler method for sd2u(1df) and su2d(1df) > > This method is shorter, easier to read, and more idiomatic.
2017-11-03Apply simpler method for sd2u(1df) and su2d(1df)Tom Ryder2-6/+6
This method is shorter, easier to read, and more idiomatic.
2017-11-01Quote filename correctly in dfv(1df)Tom Ryder1-1/+1
If we don't do this, we run the risk of expanding an arbitrary macro VERSION on any given system.
2017-11-01Add dfv(1df) version-printing toolTom Ryder1-0/+8
This is mostly just for fun, but could be handy later on when I'm playing with distributed or automated deployments of tagged and verified releases. Like a few of the other shell scripts, this is built by abusing my mi5(1df) wrapper to get static details baked into the shell script that are only known at runtime.
2017-10-31Remove -no_ssl2 from osc(1df)Tom Ryder1-1/+1
Modern OpenSSL builds, at least on Debian Stretch, don't even include this as an option anymore, because SSLv2 has been so broken for so long. There's not really much point trying to keep it. $ openssl version OpenSSL 1.1.0f 25 May 2017 $ openssl -no_ssl2 Invalid command '-no_ssl2'; type "help" for a list.
2017-10-30Refactor min.awk to match max.awkTom Ryder1-4/+2
This is more idiomatic, and explicitly initialises the result variable.
2017-10-26Correct misnamed variableTom Ryder1-1/+1
2017-10-26Make rndi(1df) upper bound a little clearerTom Ryder1-1/+2
2017-10-13Document why fnl(1df) command is wrappedTom Ryder1-1/+3
Because I forgot
2017-08-21Add arg checks to chc(1df)Tom Ryder1-0/+7
2017-08-21Add missing slash to commentTom Ryder1-1/+1
2017-08-08Correct typo commentTom Ryder1-1/+1
2017-08-08Compatible stripping for onl(1df)Tom Ryder1-2/+3
2017-08-08Nicer handling of RFC control charsTom Ryder1-4/+7
2017-08-08Restore ^L-skipping codeTom Ryder1-0/+4
2017-08-08Correct previous commitTom Ryder1-1/+1
Forgot to remove the square brackets
2017-08-08Remove two more POSIX character classesTom Ryder2-4/+1
Debian's ancient mawk doesn't support them
2017-07-03Add dot and slash to legal mftl(1df) target charsTom Ryder1-1/+1
2017-07-03Remove some unneeded bracesTom Ryder1-4/+2
2017-07-03Remove unused var from mktd(1df)Tom Ryder1-3/+0
2017-07-03Work around mawk's srand() behaviourTom Ryder2-2/+8
Specific values for these tasks get chosen way more often than other in mawk, and it seems to be caused by the random seed being above a certain value. Not sure if it's a bug or how it interacts with the POSIX standard, but this seems to fix it.
2017-07-02Correct some rndi(1df) referencesTom Ryder3-8/+4
2017-07-02Lots of cleanup of awk scriptsTom Ryder16-44/+117
Mostly inspired by suggestions from gawk --lint
2017-07-02Coerce seed to numberTom Ryder1-1/+1
2017-07-02Remove null FS assignment from trs(1df)Tom Ryder1-3/+0
gawk's --lint option complains: > awk: .dotfiles/bin/trs.awk:7: warning: null string for `FS' is a gawk extension
2017-07-02Remove POSIX char classes from AwkTom Ryder2-3/+3
I forgot that Debian's awk(1) is still a mawk that doesn't implement e.g. [:alpha:]
2017-07-01Correct Awk variable lvalue in mw(1df)Tom Ryder1-1/+1
2017-07-01Correct srand() arg countTom Ryder1-1/+4
2017-07-01Reimplement rndl(1df) in AwkTom Ryder2-38/+29
Removes the need for the temporary file. Also refactor pks(6df) to accommodate it.
2017-07-01Work around no options terminal in POSIX chmod(1)Tom Ryder1-1/+5
2017-06-29Add oii(1df)Tom Ryder1-0/+19
2017-06-25Remove unneeded `command` prefixTom Ryder1-1/+1
2017-06-24Add a caveat to trs(1df)Tom Ryder1-1/+1
2017-06-15Make han(1df) exit, not returnTom Ryder1-2/+2
2017-06-15Clean up some exit statusesTom Ryder3-4/+5
2017-06-15Add missing `exit` call to igex(1df)Tom Ryder1-0/+1
2017-06-14Switch to using awk for line counting in dub(1df)Tom Ryder1-2/+2
Seems a bit nicer, passing the variable in as data rather than code
2017-06-12Add comment to p(1df)Tom Ryder1-1/+2
2017-06-12Add fnp(1df)Tom Ryder1-0/+23
2017-06-10Refactor urlh(1df) awk a bitTom Ryder1-6/+3
2017-06-10Force integer for dub(1df) limitTom Ryder1-1/+1
2017-06-10Make dub(1df) smarter, add a caveatTom Ryder1-15/+11
2017-06-06Remove unneeded semicolonsTom Ryder1-3/+3
2017-06-04More tidying for mi5(1df)Tom Ryder1-10/+12
2017-06-04Remove unneeded FD IDTom Ryder1-1/+1
2017-06-04Playing a little more golfTom Ryder1-4/+2
2017-06-04Significant improvements to mi5(1df)Tom Ryder1-35/+102
A clunkier and probably-slower but more accurate parser--won't stumble over quoted instances of the mi5(1df) delimiter within inline macro expansions. This removes one of the CAVEATS described in the manual page. Also allow specifying the quote and unquote strings and also the dnl string in m4, mostly for completeness' sake; the manual page warns against this as I think it's probably missing the point of mi5(1df) if you're getting to that point.
2017-06-03Add some missing parenthesesTom Ryder1-1/+1