soc.octade.net is a Fediverse instance that uses the ActivityPub protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.

This server runs the snac software and there is no automatic sign-up process.

Admin email
social@octade.net

Search results for tag #bash

[?]The whale » 🌐
@thewhalecc@framapiaf.org

𝗕𝗮𝘀𝗵 𝗴𝘂𝗶𝗱𝗲:

thewhale.cc/posts/bash-guide

A guide to learn bash: basic operations, basic shell programming, tricks and debugging.

A guide to learn bash: basic operations, basic shell programming, tricks and debugging.

Alt...A guide to learn bash: basic operations, basic shell programming, tricks and debugging.

    [?]Carlos Solís » 🌐
    @csolisr@hub.azkware.net

    Exercise to the reader: write a shell script to detect which utility is this fess talking about.
    RE: mastodon.social/users/fesshole…

    ne7 boosted

    [?]Fesshole 🧻 » 🤖 🌐
    @fesshole@mastodon.social

    In 2008 I wrote a networking utility program for Linux. It's still maintained and used. Take the first letter of every sentence in its (rather long) man page and it spells "Never gonna give you up" etc etc. Nobody has ever mentioned it.

      [?]R.L. Dane :Debian: :FreeBSD: :OpenBSD: :NetBSD:🍵 :MiraLovesYou: [he/him/my good fellow] » 🌐
      @rl_dane@polymaths.social

      WHAT THE FLUFF, did I seriously just write a (dead-simple) #uxntal syntax highlighting script in #bash?!? 😂

      https://codeberg.org/rldane/scripts/src/branch/main/tallight

      All it does right now is put comments in blue and UPPERCASE strings of three or more characters in bold using tput.

      I started writing it in #POSIX script, but POSIX's read doesn't have a way to read a character at a time. ;)

      Just FYI, on this ten-year-old thinkpad, it took 16 seconds to process a 639KiB (concatenated-together) source code file. So it'll probably be decent enough for most purposes.

      #Perl would've been better, but I'm quite rusty at it. ☺️

      #uxn #tal #scripting #shell #ShellScript #ShellScripts #ShellScripting #YakShaving

      A screenshot of a foot terminal showing syntax-highlighted uxntal source code

Actual text from screenshot as follows:

  - The opcode DEO2 takes the top item as the address and the next two
    bytes as the value
  - The line results in writing the value f07f to the address 08

  An easy way to read the four different colours is top-down, left-right.

  1. colour is fff
  2. colour is 000
  3. colour is 7ec
  4. and last colour is f00

  This means that every colour has 12 bits [3 nibbles] )

|0100 #f07f .System/r DEO2 ( set the red channel )
      #f0e0 .System/g DEO2 ( the green one )
      #f0c0 .System/b DEO2 ( and lastly the blue one )

( --- Working with the screen --- )
( To draw on the screen device, we first have to set the x and y coordinates,
  that want to use to put a pixel on. Those values have to be written to 2829
  and 2a2b. But we can use our handy label again.

  The next line reads:

  - Push 0008 to the stack
38%

      Alt...A screenshot of a foot terminal showing syntax-highlighted uxntal source code Actual text from screenshot as follows: - The opcode DEO2 takes the top item as the address and the next two bytes as the value - The line results in writing the value f07f to the address 08 An easy way to read the four different colours is top-down, left-right. 1. colour is fff 2. colour is 000 3. colour is 7ec 4. and last colour is f00 This means that every colour has 12 bits [3 nibbles] ) |0100 #f07f .System/r DEO2 ( set the red channel ) #f0e0 .System/g DEO2 ( the green one ) #f0c0 .System/b DEO2 ( and lastly the blue one ) ( --- Working with the screen --- ) ( To draw on the screen device, we first have to set the x and y coordinates, that want to use to put a pixel on. Those values have to be written to 2829 and 2a2b. But we can use our handy label again. The next line reads: - Push 0008 to the stack 38%

        [?]Free Software Foundation » 🌐
        @fsf@hostux.social

        Assigning your copyright to the FSF helps defend the GPL and keep software free. Thank you Léa Gris for assigning your copyright to the FSF! More at: u.fsf.org/4co

          [?]Free Software Foundation » 🌐
          @fsf@hostux.social

          Assigning your copyright to the FSF helps defend the GPL and keep software free. Thank you Léa Gris for assigning your copyright to the FSF! More at: u.fsf.org/4co

            [?]Free Software Foundation » 🌐
            @fsf@hostux.social

            Assigning your copyright to the FSF helps defend the GPL and keep software free. Thank you Léa Gris for assigning your copyright to the FSF! More at: u.fsf.org/4co

              [?]Free Software Foundation » 🌐
              @fsf@hostux.social

              Assigning your copyright to the FSF helps defend the GPL and keep software free. Thank you Léa Gris for assigning your copyright to the FSF! More at: u.fsf.org/4co

                [?]Free Software Foundation » 🌐
                @fsf@hostux.social

                Assigning your copyright to the FSF helps defend the GPL and keep software free. Thank you Léa Gris for assigning your copyright to the FSF! More at: u.fsf.org/4co

                  [?]Jesus Michał von Gentoo 🏔 (he) » 🌐
                  @mgorny@social.treehouse.systems

                  Well, I wanted to regret using for ebuilds, but I guess that's not really the problem in this case.

                  that bash has this default of `shopt -s checkwinsize` that means it automatically sets COLUMNS and ROWS to the terminal size. If you start a new shell, it inherits these variables from the parent, along with the export bit, but as soon as the first external command is executed, it resets the value to the actual terminal size.

                  So if an ebuild does:

                  src_test() {
                  local -x COLUMNS=80
                  emake check
                  }

                  Then each shell started by make(1) will have "COLUMNS=80" exported at first, but as soon as another command is executed, it will magically start exporting a different value. What's really absurd about it, if we didn't export COLUMNS override, these shells won't be exporting the variable in the first place.

                  This is just batshit insane.

                  bugs.gentoo.org/984547

                  Thanks to Serhiy Storchaka for bringing my attention to the problem.

                    [?]The whale » 🌐
                    @thewhalecc@framapiaf.org

                    𝗕𝗮𝘀𝗵 𝗴𝘂𝗶𝗱𝗲:

                    thewhale.cc/posts/bash-guide

                    A guide to learn bash: basic operations, basic shell programming, tricks and debugging.

                    A guide to learn bash: basic operations, basic shell programming, tricks and debugging.

                    Alt...A guide to learn bash: basic operations, basic shell programming, tricks and debugging.

                      [?]Free Software Foundation » 🌐
                      @fsf@hostux.social

                      Assigning your copyright to the FSF helps defend the GPL and keep software free. Thank you Léa Gris for assigning your copyright to the FSF! More at: u.fsf.org/4co

                        [?]Free Software Foundation » 🌐
                        @fsf@hostux.social

                        Assigning your copyright to the FSF helps defend the GPL and keep software free. Thank you Léa Gris for assigning your copyright to the FSF! More at: u.fsf.org/4co

                          [?]The whale » 🌐
                          @thewhalecc@framapiaf.org

                          𝗕𝗮𝘀𝗵 𝗴𝘂𝗶𝗱𝗲:

                          thewhale.cc/posts/bash-guide

                          A guide to learn bash: basic operations, basic shell programming, tricks and debugging.

                          A guide to learn bash: basic operations, basic shell programming, tricks and debugging.

                          Alt...A guide to learn bash: basic operations, basic shell programming, tricks and debugging.

                            [?]Free Software Foundation » 🌐
                            @fsf@hostux.social

                            Assigning your copyright to the FSF helps defend the GPL and keep software free. Thank you Léa Gris for assigning your copyright to the FSF! More at: u.fsf.org/4co

                              [?]Free Software Foundation » 🌐
                              @fsf@hostux.social

                              Assigning your copyright to the FSF helps defend the GPL and keep software free. Thank you Léa Gris for assigning your copyright to the FSF! More at: u.fsf.org/4co

                                OCTADE boosted

                                [?]Brian Monroe » 🌐
                                @paradoxguitarist@mastodon.online

                                So I DO love me some python, but I just want to say that is awesome.

                                I had no idea this was a thing:

                                echo "${variable/$inTheString/$replacesIt}"