Permisuan
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
BlackEco@lemmy.blackeco.com to Programming@programming.devEnglish · 3 days ago

Error handling in bash

notifox.com

external-link
message-square
27
link
fedilink
1
external-link

Error handling in bash

notifox.com

BlackEco@lemmy.blackeco.com to Programming@programming.devEnglish · 3 days ago
message-square
27
link
fedilink
Error handling in bash | Notifox Blog
notifox.com
external-link
Most bash scripts are very brittle because error handling is an afterthought. In this blogpost you'll learn about the easiest ways to gracefully catch and handle errors. Best practices and common pitfalls.
  • IanTwenty@piefed.social
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 days ago

    Errors in command substitution e.g. $(cat file) are ignored by ‘set -e’, one example of its confusing nature. It does not force you to all handle errors, just some errors and which ones depends on the code you write.

    https://mywiki.wooledge.org/BashPitfalls#set_-euo_pipefail

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.

  • 57 users / day
  • 182 users / week
  • 535 users / month
  • 605 users / 6 months
  • 0 local subscribers
  • 25.5K subscribers
  • 222 Posts
  • 1.5K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • UlrikHD@programming.dev
  • bugsmith@programming.dev
  • Spyro@programming.dev
  • BE: 0.19.15
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org