oO.o's Neverending Tech Blog

He’s the one that said it, so its funny he didnt know right away what I was talking about.

3 Likes

I think it’s also from something though.

Maybe it’s an old meme




That appears to be the original source.

1 Like

“Who said it better”

FInally happened. Solus has failed me.

sudo eopkg search sendmail
sudo eopkg search postfix
sudo eopkg search exim

Nada. How do I send myself email alerts?

Must have typo’d which mail before, Gnu mail is actually installed. I’d still prefer sendmail though since that’s what I use in all my scripts (for portability funny enough).

Wait, can Gnu mail even send anything externally? Idk, I’ll figure it out later.


Also just found the --grep= option in journalctl man page and thought, “hey, don’t have to pipe to grep, small win,” but alas…

Compiled without pattern matching support

That appears to be the case on Ubuntu as well, so maybe that’s normal? Funny that someone decided pattern matching was just one dependency too many for systemd… gotta draw the line somewhere I guess.

2 Likes

journalctl -g does work in CentOS 8.

1 Like

Script of the day: archive data onto tape and cloud.

Edit: updated to its final form. lto tapes and rclone are both very quirky…

2 Likes

So ran into a weird issue using sed to replace single quotes in a string.

This appeared to work great with everything except a single quote, in which case, it would append the replacement string to the end. No error code or anything.

$ ILLEGAL_CHAR="'"
$ OCTAL=00047
$ echo "My Family's Vacation" | sed "s/\\${ILLEGAL_CHAR}/\[${OCTAL}\]/g"
My Family's Vacation[00047]

If I don’t escape the character variable, it works:

$ ILLEGAL_CHAR="'"
$ OCTAL=00047
$ echo "My Family's Vacation" | sed "s/${ILLEGAL_CHAR}/\[${OCTAL}\]/g"
My Family[00047]s Vacation

Testing this on macOS, it behaves correctly in both instances. The above behavior is in current CentOS 7.

Since I do need to escape some illegal char values and failing to do so does result in an error code, my solution is to basically try-catch it.

$ ILLEGAL_CHAR="'"
$ OCTAL=00047
$ echo "My Family's Vacation" | { sed "s/${ILLEGAL_CHAR}/\[${OCTAL}\]/g" 2>/dev/null || sed "s/\\${ILLEGAL_CHAR}/\[${OCTAL}\]/g"; }
My Family[00047]s Vacation
2 Likes

That’s interesting. :confused:

Sed has some interesting characteristics, I guess.

1 Like

Also… are while loops like this supposed to run once even on no input?

while read thing; do
  #runs once anyway with an empty string
done <<< "$( 
  #do stuff that results in no output
)"

I need to order myself plaque that says “STOP! Just do it in Python.”

1 Like

This is the correct answer.

3 Likes

Never thought “copy files from a hard drive to a tape and upload to Google Drive” would turn into a 370 line shell script…

5 Likes

Just hash every file and use that as the name, save a lookup table somewhere. All problems solved :smiley:

1 Like

Has to be user-friendly after I’m long gone. It’s a photographer’s life work, so LTFS and filenames as close to original as possible is the best solution.

I think I’m pretty close, there are just some weird edge cases popping up. HFS+ will allow just about any control character in a file or directory name and I’m running into that. For instance, there was a folder with a return as the last character and ‘find‘ was truncating it, so when the script went to copy, it was saying not found.

I’d gotten through 2 days of transfers before I hit the last issue, so I’m just adapting as I go.

Wow, they really pack in the stations at this place.

Wtf is the use of a monitor like that in a bright room full of windows? I guarantee those monitors are all glared up, despite the hoods.

A sad dark room makes a lousy photo though.

1 Like

I think they need to crank up the brightness/contrast because it’s a low lit room, since sunlight from the windows are way blown out.

RIP


How is this thing still $130? Afaik, it’s been the same hardware since it launched many years ago. Wish it was more like $80…

5 Likes

Testbed to the rescue.

2 Likes

Ill sell you one.

2 Likes

Ah, thanks for the offer but it’s already ordered. Need it ASAP unfortunately.

Because unifi is overpriced an garbo

2 Likes