
CommunityNews
Bash Strict Mode
Use Bash Strict Mode (Unless You Love Debugging)
Let’s start with the punchline. Your bash scripts will be more robust, reliable and maintainable if you start them like this:
1#!/bin/bash set -euo pipefail IFS=$'\n\t'
I call this the unofficial bash strict mode. This causes bash to behave in a way that makes many classes of subtle bugs impossible. You’ll spend much less time debugging, and also avoid having unexpected complications in production.
There is a short-term downside: these settings make certain common bash idioms harder to work with. Most have simple workarounds, detailed below: jump to Issues & Solutions. But first, let’s look at what these obscure lines actually do.
http://redsymbol.net/articles/unofficial-bash-strict-mode/
This thread was posted by one of our members via one of our news source trackers.
Popular General Dev topics

A field guide to help you recognize achievement, spot A field guide to help you recognize achievement, spot bottlenecks, and debug your d...
New

We engineered a wearable microphone jammer that is capable of disabling microphones in its user’s surroundings, including hidden micropho...
New

How a piece of advice became a lifestyle
TABLE OF CONTENTS
WHERE TO BEGIN…
FIRST CONTACT
PICKING EMACS FOR LIFE
CHEATING ON EMACS
SERE...
New

Developing Godot Projects with Neovim.
When I started using Godot Engine, what surprised me the most is the built-in Language Server Pro...
New

ABSTRACT
In lieu of a traditional , I’ve tried to distill the essence of the talk into a collection of maxims:
All programmers are API ...
New

Large Language Models like ChatGPT say The Darnedest Things.
The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New

Why Python keeps growing, explained | The GitHub Blog.
A deep dive into why more people are using Python than ever, its key use cases, a...
New

50 Shades of Go: Traps, Gotchas, and Common Mistakes for New Golang Devs.
Go is a simple and fun language, but, like any other language,...
New

Christian Mills - Testing Intel’s Arc A770 GPU for Deep Learning Pt. 2.
This post covers my experience training image classification mod...
New

Apple Patents Suggest Future AirPods Could Monitor Biosignals & Brain Activity - AppleMagazine.
The US Patent & Trademark Office...
New
Other popular topics

In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first:
asdf plugin-upd...
New

Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New

Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New

Author Spotlight
Dmitry Zinoviev
@aqsaqal
Today we’re putting our spotlight on Dmitry Zinoviev, author of Data Science Essentials in ...
New

If you want a quick and easy way to block any website on your Mac using Little Snitch simply…
File > New Rule:
And select Deny, O...
New

I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New

Author Spotlight:
Peter Ullrich
@PJUllrich
Data is at the core of every business, but it is useless if nobody can access and analyze ...
New

Author Spotlight:
Sophie DeBenedetto
@SophieDeBenedetto
The days of the traditional request-response web application are long gone, b...
New

I’m able to do the “artistic” part of game-development; character designing/modeling, music, environment modeling, etc.
However, I don’t...
New

This is cool!
DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON
We just witnessed something incredible: the largest open-s...
New
Categories:
Sub Categories:
- All
- In The News
- Dev Chat (200)
- Questions (32)
- Resources (118)
- Blogs/Talks (26)
- Jobs (3)
- Events (15)
- Code Editors (58)
- Hardware (57)
- Reviews (4)
- Sales (15)
- Design & UX (4)
- Marketing & SEO (1)
- Industry & Culture (14)
- Ethics & Privacy (19)
- Business (4)
- Learning Methods (4)
- Content Creators (7)
- DevOps & Hosting (9)
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /onivim
- /svelte
- /typescript
- /crystal
- /c-plus-plus
- /kotlin
- /tailwind
- /gleam
- /ocaml
- /react
- /elm
- /flutter
- /vscode
- /ash
- /opensuse
- /centos
- /php
- /deepseek
- /html
- /scala
- /zig
- /sublime-text
- /textmate
- /nixos
- /debian
- /lisp
- /agda
- /react-native
- /kubuntu
- /arch-linux
- /ubuntu
- /revery
- /spring
- /manjaro
- /django
- /nodejs
- /diversity
- /lua
- /julia
- /c
- /slackware
- /neovim