GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 08:35:36 JST aliss aliss
    • Tosti ?
    @tost it also works!
    In conversation Monday, 19-Sep-2022 08:35:36 JST from outerheaven.club permalink

    Attachments


    1. https://outerheaven.club/media/735b9306-20bd-49c1-8a8d-961e4d0d33ab/Screenshot%202022-09-19%20at%2001.30.27.png
    • Embed this notice
      Hélène (helene@p.helene.moe)'s status on Monday, 19-Sep-2022 08:35:34 JST Hélène Hélène
      in reply to
      • Tosti ?

      @tost @aliss is it possible or good to do "$pattern"{debian,fedora}"

      In conversation Monday, 19-Sep-2022 08:35:34 JST permalink
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 08:35:35 JST Tosti ? Tosti ?
      in reply to

      @aliss@outerheaven.club pro tip try
      "$pattern"debian

      In conversation Monday, 19-Sep-2022 08:35:35 JST permalink
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 08:37:07 JST Tosti ? Tosti ?
      in reply to
      • Hélène

      @helene@p.helene.moe @aliss@outerheaven.club shell-dependent, not generally a good idea unless you're targetting a specific one

      In conversation Monday, 19-Sep-2022 08:37:07 JST permalink
      Hélène likes this.
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 08:38:33 JST Tosti ? Tosti ?
      in reply to
      • Hélène

      @aliss@outerheaven.club @helene@p.helene.moe yes, you could
      I do still think my plain "debian" grep is better fwiw
      "robustness" is fake news

      In conversation Monday, 19-Sep-2022 08:38:33 JST permalink
      Hélène likes this.
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 08:38:34 JST aliss aliss
      in reply to
      • Hélène
      • Tosti ?

      @tost @helene if only we had those shiny things in shell-land..

      u could do "$pattern"debian|"$pattern"fedora) in the switch case right tosti?

      In conversation Monday, 19-Sep-2022 08:38:34 JST permalink
    • Embed this notice
      Hélène (helene@p.helene.moe)'s status on Monday, 19-Sep-2022 08:39:20 JST Hélène Hélène
      in reply to
      • Tosti ?

      @tost @aliss and even then why put the ^ID= in the iterated items instead of in the grep? unless i’m missing something

      In conversation Monday, 19-Sep-2022 08:39:20 JST permalink
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 08:39:42 JST Tosti ? Tosti ?
      in reply to
      • Hélène

      @helene@p.helene.moe @aliss@outerheaven.club you have to for this to ork

      In conversation Monday, 19-Sep-2022 08:39:42 JST permalink
      Hélène likes this.
    • Embed this notice
      Hélène (helene@p.helene.moe)'s status on Monday, 19-Sep-2022 08:40:08 JST Hélène Hélène
      in reply to
      • Tosti ?
      @aliss @tost (i think rust is anything but robust... :cirno_peek:
      In conversation Monday, 19-Sep-2022 08:40:08 JST permalink
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 08:40:09 JST aliss aliss
      in reply to
      • Hélène
      • Tosti ?
      @tost @helene except in rust land uwu
      In conversation Monday, 19-Sep-2022 08:40:09 JST permalink
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 08:40:23 JST aliss aliss
      in reply to
      • Hélène
      • Tosti ?
      @tost @helene
      > I do still think my plain "debian" grep is better fwiw

      we know you're very talented
      and smart
      and kind
      :celsilvercrystalheart:
      In conversation Monday, 19-Sep-2022 08:40:23 JST permalink
      Hélène likes this.
    • Embed this notice
      Hélène (helene@p.helene.moe)'s status on Monday, 19-Sep-2022 08:40:40 JST Hélène Hélène
      in reply to
      • Tosti ?
      @tost @aliss so i am missing something
      In conversation Monday, 19-Sep-2022 08:40:40 JST permalink
    • Embed this notice
      Hélène (helene@p.helene.moe)'s status on Monday, 19-Sep-2022 08:45:20 JST Hélène Hélène
      in reply to
      • Tosti ?
      @tost @aliss why does it do that, i don't get it still :acat_chew:
      In conversation Monday, 19-Sep-2022 08:45:20 JST permalink
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 08:45:21 JST Tosti ? Tosti ?
      in reply to
      • Hélène

      @helene@p.helene.moe @aliss@outerheaven.club let me make this a bit simpler to demonstrate the mechanismfor i in fake news fedora-logo-icon tm; do grep -qe "$i" /etc/os-release && break done echo "$i" # fedora-logo-icon on my machine

      In conversation Monday, 19-Sep-2022 08:45:21 JST permalink
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 08:45:40 JST Tosti ? Tosti ?
      in reply to
      • Hélène

      @helene@p.helene.moe @aliss@outerheaven.club the output is the pattern you put in, which means the pattern is what needs to go into the case-pattern (or something that'll match against it)

      In conversation Monday, 19-Sep-2022 08:45:40 JST permalink
      Hélène likes this.
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 08:45:41 JST aliss aliss
      in reply to
      • Hélène
      • Tosti ?
      @tost @helene i made it work.. somehow? https://outerheaven.club/notice/ANhjEhfR4Mvx6qifSq
      In conversation Monday, 19-Sep-2022 08:45:41 JST permalink

      Attachments

      1. Domain not in remote thumbnail source whitelist: outerheaven.club
        aliss (@aliss@outerheaven.club)
        @helene @tost i believe you're right! this totally works
      Hélène likes this.
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 08:45:44 JST Tosti ? Tosti ?
      in reply to
      • Hélène

      @aliss@outerheaven.club @helene@p.helene.moe shell dependent :^)

      In conversation Monday, 19-Sep-2022 08:45:44 JST permalink
      Hélène likes this.
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 08:46:57 JST aliss aliss
      in reply to
      • Hélène
      • Tosti ?
      @tost @helene oh so is not guaranteed ic, in which ones can it work like that, in which ones cant?
      In conversation Monday, 19-Sep-2022 08:46:57 JST permalink
      Hélène likes this.
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 08:46:58 JST aliss aliss
      in reply to
      • Hélène
      • Tosti ?
      @tost @helene helene if you're running bash you probably can put the ^ID= just in the grep yes <3<3333
      In conversation Monday, 19-Sep-2022 08:46:58 JST permalink
      Hélène likes this.
    • Embed this notice
      Hélène (helene@p.helene.moe)'s status on Monday, 19-Sep-2022 08:53:45 JST Hélène Hélène
      in reply to
      • Tosti ?
      @aliss @tost ikr
      In conversation Monday, 19-Sep-2022 08:53:45 JST permalink
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 08:53:46 JST aliss aliss
      in reply to
      • Hélène
      • Tosti ?

      @tost @helene

      how case(1b) functions apparently shellcheck people didn’t catch it :hehecat:

      im not sure what POSIX says on case’s patterns behavior, i’ll have to read btw i didn’t find info about the desync pattern thing

      some shells have unqualified entries work as wildcards or terminators and it’s wild you should generally presume them to be “flat” strings icic thx lots for the explaining and all your time tonight <3 u always make me learn and i feel grateful

      helene: ur girl hot ngl

      In conversation Monday, 19-Sep-2022 08:53:46 JST permalink
      Hélène likes this.
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 08:53:47 JST Tosti ? Tosti ?
      in reply to
      • Hélène

      @aliss@outerheaven.club @helene@p.helene.moe it depends on how case(1b) functions
      some shells have unqualified entries work as wildcards or terminators and it's wild
      you should generally presume them to be "flat" strings

      In conversation Monday, 19-Sep-2022 08:53:47 JST permalink
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 08:59:17 JST Tosti ? Tosti ?
      in reply to
      • Hélène

      @aliss@outerheaven.club @helene@p.helene.moe im not sure what POSIX says on case’s patterns behaviorokay, so

      https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_04_05see Pattern Matching Notation
      that is matched by the string resulting from the tilde expansion, parameter expansion, command substitution, arithmetic expansion, and quote removal of the given wordLet's go to Pattern Matching Notation: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13If any character (ordinary, shell special, or pattern special) is quoted, that pattern shall match the character itself. The shell special characters always require quoting.
      When unquoted and outside a bracket expression, the following three characters shall have special meaning in the specification of patternsthis raises the question of what happens when you have a quoted variable expansion - is the expanded output considered quoted or not?
      let's look at https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02
      which sends us to https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
      . . . which has nothing to say on the matter

      POSIX is ultimately an "unfinished" (or rather, incomplete - open to interpretation) specification, especially when it comes to shell
      and this is where the potential differnence lies
      welcome to hell

      In conversation Monday, 19-Sep-2022 08:59:17 JST permalink

      Attachments

      1. Domain not in remote thumbnail source whitelist: pubs.opengroup.org
        Shell Command Language
      2. Domain not in remote thumbnail source whitelist: pubs.opengroup.org
        Shell Command Language
      3. Domain not in remote thumbnail source whitelist: pubs.opengroup.org
        Shell Command Language
      4. Domain not in remote thumbnail source whitelist: pubs.opengroup.org
        Shell Command Language
      Hélène likes this.
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 08:59:32 JST Tosti ? Tosti ?
      in reply to
      • Hélène

      @helene@p.helene.moe @aliss@outerheaven.club ;jnergwnegr;woengowg

      In conversation Monday, 19-Sep-2022 08:59:32 JST permalink
      Hélène likes this.
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 09:00:25 JST aliss aliss
      in reply to
      • Hélène
      • Tosti ?
      @helene @tost love how the markdown formatting is printed totally cursed
      In conversation Monday, 19-Sep-2022 09:00:25 JST permalink
      Hélène likes this.
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 09:02:18 JST Tosti ? Tosti ?
      in reply to
      • Hélène

      @aliss@outerheaven.club @helene@p.helene.moe also yes shellcheck is really bad and I hate it and cannot recommend anyone use it ever

      In conversation Monday, 19-Sep-2022 09:02:18 JST permalink
      Hélène likes this.
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 09:04:22 JST aliss aliss
      in reply to
      • Hélène
      • Tosti ?
      @helene @tost explain.. <3
      In conversation Monday, 19-Sep-2022 09:04:22 JST permalink
      Hélène likes this.
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 09:15:49 JST aliss aliss
      in reply to
      • Hélène
      • Tosti ?
      @tost @helene woa thx! so undefined behavior then, ic

      im a bit impressed with how fast u found everything
      when i grow up i want to be like tosti

      also: welcome to (s)hell (pic)
      In conversation Monday, 19-Sep-2022 09:15:49 JST permalink

      Attachments


      1. https://outerheaven.club/media/7e2a619d-5138-49fc-981c-9eda732e3527/image.png
      Hélène likes this.
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 09:16:01 JST Tosti ? Tosti ?
      in reply to
      • Hélène

      @aliss@outerheaven.club @helene@p.helene.moe tosti shell book :apensive:

      In conversation Monday, 19-Sep-2022 09:16:01 JST permalink
      Hélène likes this.
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 09:19:47 JST aliss aliss
      in reply to
      • Hélène
      • Tosti ?
      @tost @helene new need :sparkles_trans: unlocked :sparkles_trans:
      In conversation Monday, 19-Sep-2022 09:19:47 JST permalink
      Hélène likes this.
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 09:19:48 JST Tosti ? Tosti ?
      in reply to
      • Hélène

      @aliss@outerheaven.club @helene@p.helene.moe I should be working on it right now tbh :apensive:

      In conversation Monday, 19-Sep-2022 09:19:48 JST permalink
      Hélène likes this.
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 09:19:49 JST Tosti ? Tosti ?
      in reply to
      • Hélène

      @aliss@outerheaven.club @helene@p.helene.moe it's "been" coming on and off for 3 years or so :totodile_laugh:
      the short version is
      "if I get off my ass, it is"

      In conversation Monday, 19-Sep-2022 09:19:49 JST permalink
      Hélène likes this.
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 09:19:50 JST aliss aliss
      in reply to
      • Hélène
      • Tosti ?
      @tost @helene oh is coming this year?
      In conversation Monday, 19-Sep-2022 09:19:50 JST permalink
      Hélène likes this.
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 09:21:14 JST Tosti ? Tosti ?
      in reply to

      @aliss@outerheaven.club absolutely
      if you go for strict POSIX compatibility, \e will NOT work, for instance
      octals still should though
      see https://www.mankier.com/1p/printf

      In conversation Monday, 19-Sep-2022 09:21:14 JST permalink

      Attachments


      Hélène likes this.
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 09:21:15 JST aliss aliss
      in reply to
      • Tosti ?
      @tost i have it without %b in my profile
      like
      ```
      export LESS_TERMCAP_md="$(printf '\e[1;36m')"
      ```

      i know %b is used for escapes and love the correctness but is there any chance without it printf would explode?
      In conversation Monday, 19-Sep-2022 09:21:15 JST permalink
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 09:21:16 JST Tosti ? Tosti ?
      in reply to

      @aliss@outerheaven.club the correct way is using printf with %b
      namely:
      myvar=$(printf '%b' 'my\eescape')

      In conversation Monday, 19-Sep-2022 09:21:16 JST permalink
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 09:21:17 JST aliss aliss
      in reply to
      • Tosti ?

      @tost this is very sensible yes, i generally put doubles because sometimes variables get tossed into another variable’s values at a later time, but if you’re strict with the quoting you know you will only get literals and not variable expansions so you reduce the places where to look into for debugging..

      where you should also use $’’

      yes, i had to do this $'' when i was defining LESS_TERMCAP for coloring it (export LESS_TERMCAP_mb=$'\e[1;31m'); the other route was to use command substitution with $(printf <escape>) (becuse apparently $'' is not defined by POSIX or so shellcheck says

      finally, there’s the cursed route of using $(tput <something>) i’ve seen it in the wild but i know tput is way slower than printf escapes so i was wary of using it

      In conversation Monday, 19-Sep-2022 09:21:17 JST permalink
    • Embed this notice
      Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 09:21:18 JST Tosti ? Tosti ?
      in reply to

      @aliss@outerheaven.club another pro tip
      use single quotes unless you're planning to have variable expansion
      except in bash, where you should also use $'' sometimes

      In conversation Monday, 19-Sep-2022 09:21:18 JST permalink
    • Embed this notice
      aliss (aliss@outerheaven.club)'s status on Monday, 19-Sep-2022 09:21:19 JST aliss aliss
      in reply to
      • Tosti ?
      @tost it's certainly a way to not write a long-sed-pattern (see above: pls don't print the other non-replaced lines + pls capture this thing + pls insert escape sequence + pls have ID and ID_FAMILY)

      and is a good way to make your one "more robust" in the case that another 'debian' words appeared other than ID/IDFAM lines, u have to repeat the pattern a bit but is also nice and with more rigour :shibaheart:
      In conversation Monday, 19-Sep-2022 09:21:19 JST permalink

      Attachments


      1. https://outerheaven.club/media/d8c7501b-a09f-47da-b269-d23e129fe807/Screenshot%202022-09-19%20at%2001.32.32.png

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.