Regarding Dave Taylor's “Watermarking Images—from the Command Line” in the April 2017 issue: as usual, there is more than one way to implement a solution. Instead of this:
predot=$(echo $name | rev | cut --d. --f2-- | rev) postdot=$(echo $name | rev | cut --d. --f1 | rev) newname=$(echo ${predot}--wm.$postdot)
I would use this:
predot=${name%.*} postdot=${name##*.} newname=${predot}-wm.$postdot
Or, as a one-liner:
newname==${name%.*}-wm.${name##*.}
These pattern-matching operators are available in Bash and all shells that
are POSIX-compliant.
—
G.
Allard
Dave Taylor replies: Thanks for sharing the fancy way to do those data field chops in Bash. The reason I don't use those sorts of notations is simply because I believe it makes the script considerably harder to understand and edit if you ever go back to it weeks, months or years later. I actually have two goals I'm trying to attain simultaneously with my column: write interesting code and make sure it's as understandable as possible for the widest range of readers.
Regarding the request from a reader in the May issue's Letters section to see a photo of Shawn's truck: I'd rather see a picture of his VW. My daughter and I are just about finished with a '78 Type 1303. We had to rebuild the engine, brakes, CV joints, and on and on.
I have enjoyed the magazine a lot over the years. Keep it up.
—
Steve
Witt
Shawn Powers replies: I actually have two Beetles.
1) 1973 Super Beetle Convertible: it's my daily driver in the summer. (Winters are hard on Beetles here in Michigan. The salt eats them, so I only drive them in the summer.) It's orange with a black top, and it is in the perfect shape for driving. The paint isn't perfect, and the top isn't perfect, but they're presentable. Mechanically, it's solid, without any rust. It's not a show car, but because it's a bug, it turns heads!
2) This was my first bug, a couple years ago. It's a yellow 1975 Basic Beetle, model 110. It's a very unique model, because it was made only in 1975, and it is the “worst” outfitted Beetle ever made! In 1975, inflation was rising like crazy, but VW wanted to offer a Beetle for less than $3,000, so the company stripped down the Standard Beetle as much as it could and sent one to every dealership with a price of $2,999.
The car came with all black trim, no ventilation blower, no radio, a partial inside header cover, stripped down handles on the door, no soundproofing in the engine compartment, and every other shortcut the VW folks could think of. Mine has a few modifications from its original model 110 status. There's an aftermarket sunroof, some chrome trim (although the original flat black was in the car, and I hope to put it back on), a radio and a conversion to carburetor. I love having such a unique piece of Beetle history, but having a super stripped-down car is an odd bragging point!
Here are some details about the model 110: https://www.thesamba.com/vw/forum/viewtopic.php?t=220215&highlight=basic+model+110.
Anyway, good luck with your daughter's car. It sounds like a wonderful project! I just wish I had a garage, because working in the driveway is no fun!