# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 5
# self = https://watcher.sour.is/conv/nfpmuyq
Wasted quite some time to figure out why [ "$actual" = "$expected" ] in my shell script did actually report inequality. Printing both variables with echo "'$expected'" and also piping them through sha1sum like echo -n "$expected" | sha1sum (even tried without the -n flag) clearly showed that they were the same. In the end, set -x saved my day. actual contained captured stdout of a process with proper newlines, but I had used expected="foo\nbar", hence the comparison saw a literal backslash-n and no newline…
@lyse I hate it when that happens. 😅 It's one of the worst aspects of shell programming MO. Often you run into stuff that just makes no sense, or standards aren't followed. Like you get shit™ on stdout that was suppose to go to stderr ffs 🤦‍♂️
@lyse I hate it when that happens. 😅 It's one of the worst aspects of shell programming MO. Often you run into stuff that just makes no sense, or standards aren't followed. Like you get shit™ on stdout that was suppose to go to stderr ffs 🤦‍♂️
@lyse I hate it when that happens. 😅 It's one of the worst aspects of shell programming MO. Often you run into stuff that just makes no sense, or standards aren't followed. Like you get shit™ on stdout that was suppose to go to stderr ffs 🤦‍♂️
@prologic Yeah, shell is full of these very weird things, that just make no sense. You just have to memorize all these silly definitions. Standards were followed in my case, that's sure.