by 0x69420 · 4y ago · 0 comments
ed .ssh/config
68d
wq
done, didnt fill my terminal with vim or emacs, didnt tab over to my gui editor then back againalso it's a nicely "semantic"/compact/comprehensible way of expressing patches in things like portfiles or nix expressions:
postPatch = ''
ed Makefile <<EOF
/^CFLAGS/s/-DFOO//
/-funroll-loops/s//-ffast-math/
/_BSD_SOURCE/s//_DEFAULT_SOURCE/
/^LDFLAGS/d
/ranlib/s,,${pkgs.my_special_epic_ranlib}/bin/ranlib,
wq
EOF
'';
etc etcsure, using ed as your daily driver code editor in 2022 is probably stupid, but it's still useful enough that any linux distro that excludes it by default irritates me
ssh-keygen -R $HOST
IIRC the security warning actually used to suggest this command, but then stopped in order to discourage people from thoughtlessly bypassing it. (I don’t like this pracrice of deliberate unhelpfulness—cf Chrome’s “thisisunsafe” HSTS override—but neither do I like the results of being helpful in such cases. Ugh.)> also it's a nicely "semantic"/compact/comprehensible way of expressing patches in things like portfiles or nix expressions
As far as I can tell, your ed script sans the wq at the end is a valid sed(1) script, and that is what people usually use for casual patching in packaging situations (although Nix also has substituteInPlace et al).
I think this is my ed use-case as well. I've noticed I need to "apt-get install ed" sometimes. The standard editor is not always standard, it seems.
Linux distros don’t follow a standard anymore, as as I can tell. And Linux was never entirely POSIX compliant.
one of these days i will go around pestering distro release engineers to include it; after all, it's less heavyweight than any one of their homespun lightdm greeters
https://pubs.opengroup.org/onlinepubs/009604499/utilities/se...
It's "ed" which is de facto non-standard.
sed -i 68d .ssh/config
It was an eye-opening experience for me when I realized sed and ed commands are almost identical