Notices by aliss (aliss@outerheaven.club)
-
Embed this notice
aliss (aliss@outerheaven.club)'s status on Thursday, 29-Sep-2022 22:12:19 JST aliss what’s wrong sweetie? you haven’t eaten your hatsune miku electric blue ramen -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Thursday, 22-Sep-2022 03:30:07 JST aliss fedi -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 21-Sep-2022 22:29:15 JST aliss :acat_insane::acat_insane::acat_insane::acat_insane::acat_insane::acat_insane::acat_insane::acat_insane: -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 21-Sep-2022 21:47:06 JST aliss @helene it's suffering -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 21-Sep-2022 09:39:49 JST aliss @tost wait why the getopts and how's the mismatch -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 21-Sep-2022 09:39:47 JST aliss @tost yes because if ID is empty then we need to source os-release but if it’s not empty then we can assume it was sourced already
did it like this to not do it like "${ID:-$([ -f /etc/os-release && . /etc/os-release)}"
-
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 21-Sep-2022 09:39:45 JST aliss if you use $ID after that point, then you lose our on your ID_LIKE preference .
you mean that if i were to change $ID afterwards and run the conditional again then i’d lose the initial value?
if you use $dist after that point, it’s not going to be set if ID is already set .
you’re right, so more code, another conditional, would be needed like: if $ID is already set, then put it to dist=.. which would mask the family in a context where the user already has the environ with $ID=kali, then my code wouldn’t do anything still hmmmm :02think:
mebbe like this?:
if [ -z "$ID_LIKE" ] && [ -f /etc/os-release ] then . /etc/os-release else return 1 fi dist="${ID_LIKE:-$ID}" -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 21-Sep-2022 09:39:43 JST aliss @tost aaaa ic u were trying to provide cli through getopts and grabbing it with OPTARG, i was confused at first
oki resty well <3 -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 21-Sep-2022 09:35:43 JST aliss @samgai @tost would the first one be problematic with substring matches on data that has a well-defined structure too?
https://outerheaven.club/notice/ANha4e6GZvHvYwOmWW -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 21-Sep-2022 09:35:39 JST aliss @tost @samgai initially i didn't think to source it directly because this post made me worried
https://unix.stackexchange.com/a/433245In conversation from outerheaven.club permalink Attachments
-
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 21-Sep-2022 09:35:37 JST aliss @tost @samgai true
tosti do you prefer this source+case over your grep version?In conversation from outerheaven.club permalink -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 21-Sep-2022 09:35:35 JST aliss @tost @samgai yay we found an even shorter solution! another win for lateral thinking :meow_party:
i learned a lot through the way, all thanks to you :02superblush:
don’t forget to do something like ${ID=$ID_LIKE}
hmmm yea you wrote "${ID:=$ID_LIKE}" originally i’d write "${ID_LIKE:-$ID}“ ie: if ID_LIKE exists use that, bc is the family, if not use ID, because that will be “mommy distro”, and the :- because i don’t want to override ID_LIKE
In conversation from outerheaven.club permalink -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 21-Sep-2022 09:35:32 JST aliss @tost @samgai what only - would mean? In conversation from outerheaven.club permalink -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 21-Sep-2022 09:35:30 JST aliss @tost my brain melty a bit with the way you phrased it! haha
i was familiar with this section and i didn’t use - because if it’s set to empty string it wont expand to the second element, and i wanted that so i used :- (if i got it correctly)
if i’ve got it wrong could u clarify / develop further? <33
In conversation from outerheaven.club permalink -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 21-Sep-2022 09:35:27 JST aliss @tost aaaaaa i knew my posix after all :shiro_wink: In conversation from outerheaven.club permalink -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Wednesday, 21-Sep-2022 09:35:26 JST aliss @tost what about
if [ -z "$ID" ] && [ -f /etc/os-release ] then . /etc/os-release dist="${ID_LIKE:-$ID}" fionly when var doesn’t exist and when file exists, then source the file, then assign family to var
In conversation from gnusocial.jp permalink -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 22:21:29 JST aliss @tost @helene there is now
https://blog.palantir.com/g%C3%B6del-a-build-system-for-the-go-programming-language-9f7d2a4974e8
https://github.com/palantir/godel
damn go community you have ruined the go languageIn conversation from outerheaven.club permalink Attachments
-
Embed this notice
aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 09:27:11 JST aliss @tost @helene im only somewhat entering adulthood in shell scripting everywhere else im baby In conversation from outerheaven.club permalink -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 09:27:09 JST aliss @helene @tost tosti is ze shell mommy tho In conversation from gnusocial.jp permalink -
Embed this notice
aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 09:27:05 JST aliss 166 replies in a thread also called "a few" In conversation from outerheaven.club permalink