Sergey's Lemmy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
sanitation@lemmy.today to Programming@programming.dev · 5 days ago

A shell colon does nothing. Use it anyway. | Filip Roséen

refp.se

external-link
message-square
4
link
fedilink
36
external-link

A shell colon does nothing. Use it anyway. | Filip Roséen

refp.se

sanitation@lemmy.today to Programming@programming.dev · 5 days ago
message-square
4
link
fedilink
A shell colon does nothing. Use it anyway. | Filip Roséen - refp.se
refp.se
external-link
I've written more shell scripts than I can count, but I still stumble upon tricks that honestly blow my mind far too often than I care to admit. Latest thing that blew my head clean off? The shell colon.
alert-triangle
You must log in or register to comment.
  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    5 days ago

    If you find yourself reaching for this feature it probably means your Bash script has reached the level of complexity where you should absolutely not be using Bash. Use a real programming language instead.

    • Vulwsztyn@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      12 hours ago

      nah, a script with one param can totally be a bash script

  • pelya@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    5 days ago

    You can write true instead of : and it will look better, true is an actual command.

  • terranoid@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    4
    ·
    5 days ago

    Filed away in my colon

Programming@programming.dev

programming@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programming@programming.dev

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 305 users / day
  • 1.45K users / week
  • 3.35K users / month
  • 8.6K users / 6 months
  • 1 local subscriber
  • 27.9K subscribers
  • 3.53K Posts
  • 50.7K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • UlrikHD@programming.dev
  • bugsmith@programming.dev
  • Spyro@programming.dev
  • BE: 0.19.20
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org