Tootfinder

Opt-in global Mastodon full text search. Join the index!

@peterhoneyman@a2mi.social
2025-06-09 16:06:53

Every few years I go and dig out a 65-line C program that I wrote as a grad student and try to gently poke it through a compiler but I finally got tired of that and replaced it with a 10-line awk script.
Wow, take a look at this jalopy! Written ca. 1977 (with ed(1), the standard editor) on a PDP-11/45 running V7, prob'ly on an ADM-3A "glass terminal" in the terminal room on the second floor of the E-Quad.

#include <stdio.h>

int	print = 0;

main(argc, argv)
register char	**argv;
{
	register short	printname;

	if (--argc && argv[1][0] == '-') {
		print++;
		--argc;
		argv++;
	}

	if (argc == 0) {
		Long();
		exit(0);
	}

	printname = argc > 1;
	while (argv++, argc--) {
		if (freopen(*argv, "r", stdin) == NULL) {
			perror(*argv);
			continue;
		}
		if (printname)
			printf("%s: ", *argv);
		Long();
	}
	exit(0);
}

Long()
{
	char	tmp1[512], tmp2[512], *in = tmp1, *save = tmp2, *hold;
	register int…
@thomastraynor@social.linux.pizza
2025-06-06 12:54:52

Well those #bash and #awk scripts that I wrote to check to see if the SFTP server has files for us worked in detecting that files didn't arrive in our expected window.
I wish the team responsible would have a tool to monitor when the server has issues... Wait, silly me! They are using a…