HOWTO: See SOME lines from a file

Sometimes you want to see the head of a file. Sometimes you want to see the tail. Sometimes you just want to see some lines from a file.

The bash function below gives you some lines:

gmj@ed bash [master] $ cat <<END > lines.txt
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> 10
> 11
> 12
> 13
> 14
> 15
> END
gmj@ed bash [master] $ source some.t
sh
gmj@ed bash [master] $
gmj@ed bash [master] $ some -2 lines.txt
14
15
gmj@ed bash [master] $ some -2 lines.txt
9
10
gmj@ed bash [master] $ some -2 lines.txt
6
7
gmj@ed bash [master] $ cat some.sh

HOWTO: /bin/ed by example

Below I show an editing session that uses basic /bin/ed commands.

/bin/ed is the standard Unix Editor

ed was written round 1969. It’s still here. grep comes from /bin/ed: g/re/p works as an ed command to search globally for a regular expression and print the matching lines. ed commands will be familiar to users of sed, as sed is the “stream editor” with a very similar set of commands. ed commands will be familiar to vi users. If you type “:” in vi, you get, basically, an ed prompt. You can type ed commands (see below) and they work. “vi” is the “visual interface” to ed (or one of it’s successors). Though I am a die hard emacs user, often when I just want to do a quick edit or take some note I just fire up /bin/ed and go….

1 A sample /bin/ed session…

There's a lot to be said for climbing mountains

Vulgate (Latin): Matthew Chapter 5

1 Videns autem Jesus turbas, ascendit in montem...

or, roughly (my translation):

Jesus, however, seeing the crowd/mob/political disturbance went up on
the mountain...

The word “turba” per my paper dictionary tends towards a crowd that is politically disturbed. It can also mean an eddy (water) or a child’s spinning top. Per https://en.wiktionary.org/wiki/turba#Latin it means…

Latin Flash Cards in the 21st century (2773 AUC)

Latin flash cards are not what they were in 1983: https://latinlexicon.org. It’s got a thing where you can pop in a sentence (say, one form Cicro or random #Latin conversations on twitter (yes, they exist)), and you can click on the words (yellow above), it shows you all the possible words that particular inflected word might be and then offers to build flash cards for you…complete with citations/examples from the literature….

The History Of Rome - nihil novi

I’ve been listening to “The History of Rome” podcast recently. There is nothing new under the sun: Plagues (er, “pandemics”), riots, xenophobia, wars, greed, ambition, and political factions.

It’s filling in a lot of gaps and details for me. I would recommend if you’re interested in history. Today’s basic problems are not new.

Figure 1: Life-Size Lego Roman Soldier, Lego Store, Rome, 2019

Figure 1: Life-Size Lego Roman Soldier, Lego Store, Rome, 2019

Post 22 #100DaysToOffload https://100daystooffload.com/

Disclaimer

The opinions expressed in this [FOO] are mine, and not those of my employer. In fact, they may not even be mine. I may have changed my mind. I may have grown beyond a particular opinion. I may be trolling you. I may be engaging in Socratic dialog to tear down your beliefs. I may be tearing down my own beliefs. γνῶθι σεαυτόν!

40 years of walled gardens & open platforms: Part I

This the first in a series of articles where I do a brain dump pf something like 40 years experience with “social media” of various forms: Dial-up BBSs, Fidonet, Usenet, IRC, CompuServe, AOL, Slashdot, Sourceforge, blogspot, Facebook, Jabber, Google+, Twitter, LinkedIn, Mastadon “…we didn’t start the fire (flame-war?)…” OK, maybe we did.

I hope this is useful, or at least interesting. It may wind up just being a mix of introspection, hubris or narcissism, it may be part of working up the nerve to quit Twitter as I quit Facebook in 2016, maybe I’ll even work up the nerve to go cold turkey as tychi is doing.

Figure 1: RS-232 pin-outs

Figure 1: RS-232 pin-outs

Post 20 of #100DaysToOffload https://100daystooffload.com/

Publishing a blog on Github with Org and Hugo

If you ever thought to yourself, “Gee, Emacs Org mode is a great outlining and authoring tool, and I wish there were a powerful and simple way use it to publish static websites on github or in S3 buckets, I wish my blog could look as slick ast https://eludom.github.io/” your’re in luck, All but the simple part. Here are some of the references I used.

Post 19 of #100DaysToOffload https://100daystooffload.com/