Day: January 30, 2026💾

🖼️ Photos 📽️ Videos
Map: Debar Pond

Been since Sunday since I’ve gone for a ride 🚵‍♂️

With the bitter cold this week, along with the snow and Ice the last time I’ve ridden anywhere is last Sunday. Probably the longest I’ve been off the road since I got my bicycle, and maybe I should have ridden in yesterday, my birthday but it still was pretty cold and icy. Tomorrow I’ll need to bundle up ride to the store to grocery shop, and maybe go to Walmart for some other supplies. I’m hoping next week I can ride at least a few more days into work, via Corning’s Hill. Once the snow melts off the rail trail, there should be enough light to ride both ways to work.

What is the history of #! Interpreter first line in scripts?

The #! sequence, commonly called the shebang, was introduced by Dennis Ritchie at Bell Laboratories in January 1980. It was added to the Unix kernel to allow scripts to be executed directly as commands, making them behave more like regular executable programs.

Origin and Purpose

Before the shebang, executing a script in early Unix required explicitly calling the interpreter (e.g., sh script.sh). The operating system’s exec() system call could only run compiled binaries, which started with specific “magic number” bytes that the kernel recognized as machine instructions.

Dennis Ritchie changed the system so that the kernel would check the first two bytes of a file. If the bytes were CPU instructions, it would execute the file as a binary program.

If the bytes were the ASCII characters #! (hexadecimal 0x23 0x21), the kernel would read the rest of the line to find the path to an interpreter program. The kernel would then run that interpreter, passing the script’s filename as an argument.

This mechanism brought several key benefits:

Uniformity: Scripts could be executed uniformly like any other command, rather than only being runnable from within a shell.

Clarity in monitoring: Tools like ps (process status) would show the script’s actual name and interpreter, rather than just sh, aiding system monitoring and accounting.

Flexibility: It allowed for the use of various interpreters (e.g., sh, csh, perl, python, bash) without ambiguity, making the system more flexible.

Portability: It specified the intended interpreter within the script itself, ensuring it ran with the correct environment regardless of the user’s default shell.

Map: Ohisa State Forest

Lake Colden

Lake Colden is a 41-acre lake located at 2,764 feet at the western base of 4,714-foot Mount Colden

Ortho Lake Colden

Thematic Map: Active Landfills in New York State 2023