@aliss @tost That looks reasonable to me. It might give you some false negatives, depending on the particular subset of shell syntax that /etc/os-release wants to use.
Notices by lol fedifriend (cat aspect) (samgai@vocalounge.cafe), page 4
-
Embed this notice
lol fedifriend (cat aspect) (samgai@vocalounge.cafe)'s status on Wednesday, 21-Sep-2022 09:35:42 JST lol fedifriend (cat aspect) -
Embed this notice
lol fedifriend (cat aspect) (samgai@vocalounge.cafe)'s status on Tuesday, 20-Sep-2022 20:50:36 JST lol fedifriend (cat aspect) @tost @aliss Please don't do substring matches on data that has a well-defined structure... That's how we wound up with the mess that is HTTP User-Agent, with browser extensions breaking upon the browser reaching version 100, etc...
-
Embed this notice
lol fedifriend (cat aspect) (samgai@vocalounge.cafe)'s status on Tuesday, 20-Sep-2022 20:50:33 JST lol fedifriend (cat aspect) @tost @aliss If you're not worried about the file containing malware (which an OS-defined file hopefully shouldn't), you can do:
sh -c '. /etc/os-release; echo $ID; echo $ID_LIKE' | grep -qxe debian
-
Embed this notice
lol fedifriend (cat aspect) (samgai@vocalounge.cafe)'s status on Monday, 19-Sep-2022 23:46:14 JST lol fedifriend (cat aspect) -
Embed this notice
lol fedifriend (cat aspect) (samgai@vocalounge.cafe)'s status on Wednesday, 24-Aug-2022 22:10:56 JST lol fedifriend (cat aspect) @mametsuko Abolish the horny jail!
-
Embed this notice
lol fedifriend (cat aspect) (samgai@vocalounge.cafe)'s status on Wednesday, 24-Aug-2022 22:10:52 JST lol fedifriend (cat aspect) @puniko is innocent, they've got a licence to be horny! @mametsuko
-
Embed this notice
lol fedifriend (cat aspect) (samgai@vocalounge.cafe)'s status on Friday, 19-Aug-2022 01:14:32 JST lol fedifriend (cat aspect) @puniko A physically proximate attacker can also cause a denial of service via a commonly available construction tool (a hammer).
-
Embed this notice
lol fedifriend (cat aspect) (samgai@vocalounge.cafe)'s status on Monday, 15-Aug-2022 23:30:29 JST lol fedifriend (cat aspect) How to discover more content for your fedi timeline:
1. follow @puniko