« first day (3206 days earlier)      last day (1731 days later) » 

1:39 AM
For some reason this line ` ( ! fileExists "${DEST}/${PATH}" || [ -h "${DEST}/${PATH}" ] ) && rm -f "${DEST}/${FILE}" >/dev/null 2>&1
` Is actually able to delete the file even if the file exists and is NOT a symlink.
To be clear, the first disjunct is checking to see if the file at that path doesn't exist. If it doesn't we can proceed to removal. If it does exist, then we need to verify that it is a symlink before deleting. For some reason in POSIX sh script this deletes the file, but as a terminal command, it does NOT delete the file as expected.
Any idea? fileExists:[ ! -z "${1}" ] && [ -f "${1}" ] && [ -r "${1}" ] && [ -s "${1}" ];
The file does exist, so we should get a 0, which is then flipped to a non-zero, then we should get a non-zero because the file is NOT a symlink, so the first conjunct should be false and the whole conjunct thus fails. Is short-circuiting not a thing in POSIX sh? Techncially, my /bin/sh points to bash and always will.
 
1:53 AM
Chop it up and see which part is true that's not meant to be
 
2:07 AM
@MichaelHomer My dumbass was thinking about file paths when I was writing this, and I used PATH, which when substituted doesn't exist as an actual file in the filesystem....
Was supposed to use the variable FILE uigh
 
 
10 hours later…
12:30 PM
Is there a small telnetd and telenet client program source code available? Smaller that the inetutils ones.
 
 
2 hours later…
2:32 PM
@Biswapriyo BSD code is often more terse than Linux and GNU code. You could have a look at the OpenBSD telnet client code here: cvsweb.openbsd.org/src/usr.bin/telnet
There's no telnetd daemon on OpenBSD.
You would not be able to compile that on Linux, obviously, but it may be good for reading at least.
 
2:55 PM
wat up @Kusalananda
 
 
1 hour later…
4:15 PM
@Jesse_b Summer, not much else. What's happening over at your place?
Oh, switched to zsh yesterday. I mean, as an interactive shell it's not very much different from any other POSIX shell (was using yash before, and straight /bin/sh before that), so it's not like it's a big change.
 
@Kusalananda not much, trying to keep my lawn alive
@Kusalananda I've considered it before but I think I'm just too familiar with bash to make a switch
 
@Kusalananda Though I am interested in simple telnetd like thinks. Just to get the idea how it works. If there is small ssh client & demon I would also like to check. And what are those "(in the Attic)" in that bsd repo?
 
Apparently, macOS will start using it as the default login shell.
 
@Kusalananda zsh?
 
@Jesse_b Yes.
 
4:22 PM
wow
Well that will probably be better than using bash 3.2
 
@Biswapriyo The OpenBSD project uses CVS for source revision control. CVS puts deleted files in an "Attic" subdirectory in the directory from where the files were deleted.
@Jesse_b Very much better.
 
> While a number of Mac developers have already moved on to even more modern shells like Fish
(╯°□°)╯︵ ┻━┻
 
That's just "newer is better" BS.
 
I can't imagine anyone using fish shell non-ironically
 
Me neither.
Every time I do a git pull in my clone of fish-shell, there's a multitude of changes to the code. It's not stable enough to ship with an OS like macOS.
 
4:32 PM
I've always thought of it as sort of a novelty thing
like "Justin Beiber Linux"
 
Also, the fish executable file is a whooping 24 MB on my system.
 
odd, mine is only 1.4M
$ /usr/local/bin/fish --version
fish, version 3.0.2
 
[eeyore] % ./fish --version
fish, version 3.0.2-1392-g9e6ae1cb
[eeyore] % ls -lh fish
-rwxr-xr-x  1 kk  kk  23.9M Jul 20 18:31 fish
It's likely that it's compiled with libfishlib.a statically linked.
That file is 63 MB though.
 
I installed mine through brew I'm pretty sure
 
I'm rebuilding it now without debug symbols to see if that helps,
Yeah, that was it. Without debug symbols, the executable shrinks down to just over 2 MB.
 
 
4 hours later…
8:41 PM
Hi, quick question: I've noticed that "shopt -s nullglob" crashes the ssh connection, when executing .sh through "ssh -t ... " - are there any known workarounds?
 
8:52 PM
My bad, the "nullglob" wasn't the issue, it was the script.
 

« first day (3206 days earlier)      last day (1731 days later) »