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
    don Elías (como los buses) 🥨 (donelias@mastodon.cr)'s status on Wednesday, 15-Jul-2026 00:01:14 JST don Elías (como los buses) 🥨 don Elías (como los buses) 🥨
    in reply to
    • :rainbowCrow:

    @cR0w I like using $_ in bash

    It refers to the final argument of the last command, useful when such argument is very long, like:

    mkdir /var/log/very/long/dir/path
    chmod 2750 $_
    cd $_

    There $_ holds /var/log/very/long/dir/path

    When writing this, I was thinking that something feels special about it, and just remembered that this is a trick that a human being taught me years ago, not something I read in a manual.

    In conversation about 16 days ago from mastodon.cr permalink
    • Embed this notice
      :rainbowCrow: (cr0w@infosec.exchange)'s status on Wednesday, 15-Jul-2026 00:01:15 JST :rainbowCrow: :rainbowCrow:

      You know how there are weird tricks with computer stuff that you think everyone knows but they don't? I live learning and teaching new things like those when they come up.

      Today's was the carat substitution in bash. It probably works in other shells too but IDK, I'm too old to learn a new shell.

      The way it works is fairly similar to the / in sed or similar. You can use them to run the previous command but with a string substitution.

      For example, let's say I entered this command:

      dig A cascadiacrow.org

      When it fails to resolve, I realize it was a .com domain. Rather than retyping the command, or hitting the up arrow to change the previous command, you could do this:

      ^org^com^

      And it would run:

      dig A cascadiacrow.com

      Kind of cool with those one liners you spend way too much time on and find a typo.

      Anyway, I used it and someone thought it was magic so if it's new to you too, happy Monday.

      In conversation about 16 days ago permalink
      prettygood likes this.
      Jesse 🇫🇷 repeated this.

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.