
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

Apple co-founder Steve Wozniak is suing YouTube for allegedly allowing scammers to use images and videos of him to defraud people.
The s...
New

A Framework for Prioritizing Tech Debt.
Leverage is a powerful tool that applies to many things, including the code we write. However, t...
New

Rewrite it in Rust by ridiculousfish · Pull Request #9512 · fish-shell/fish-shell.
(Sorry for the meme; also this is obligatory.)
I thi...
New

Why I like Clojure as a solo developer | Biff.
Most of the reasons fall into a few categories: data orientation, the JVM, and the REPL.
New

zig/http.zig at 7cf2cbb33ef34c1d211135f56d30fe23b6cacd42 · ziglang/zig.
General-purpose programming language and toolchain for maintaini...
New

The First Social-Media Babies Are Growing Up—And They’re Horrified.
How would you feel if millions of people watched your childhood tant...
New

9 fintech engineering mistakes.
Read this list unless you want to build a money dissappearing system
New

Dark mode isn’t as good for your eyes as you believe.
The shadowy display mode has leagues of fans claiming it helps reduce eye strain, ...
New

There are countless articles why developers should not focus on Frameworks too much and instead learn to understand the underlying langua...
New

About accelerationism, NRx, and the intersection of technology, religion, and philosophy: an analysis of the essential ideas in the new A...
New
Other popular topics

What chair do you have while working… and why?
Is there a ‘best’ type of chair or working position for developers?
New

poll
poll
Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New

We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New

Just done a fresh install of macOS Big Sur and on installing Erlang I am getting:
asdf install erlang 23.1.2
Configure failed.
checking ...
New

Tailwind CSS is an exciting new CSS framework that allows you to design your site by composing simple utility classes to create complex e...
New

If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New

The V Programming Language
Simple language for building maintainable programs
V is already mentioned couple of times in the forum, but I...
New

Was just curious to see if any were around, found this one:
I got 51/100:
Not sure if it was meant to buy I am sure at times the 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

Hello,
I’m a beginner in Android development and I’m facing an issue with my project setup. In my build.gradle.kts file, I have the foll...
New
Categories:
Sub Categories:
- All
- In The News
- Dev Chat (201)
- Questions (33)
- Resources (118)
- Blogs/Talks (26)
- Jobs (3)
- Events (15)
- Code Editors (58)
- Hardware (57)
- Reviews (5)
- Sales (15)
- Design & UX (4)
- Marketing & SEO (2)
- Industry & Culture (14)
- Ethics & Privacy (19)
- Business (4)
- Learning Methods (4)
- Content Creators (7)
- DevOps & Hosting (9)
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /onivim
- /svelte
- /typescript
- /crystal
- /kotlin
- /c-plus-plus
- /tailwind
- /gleam
- /ocaml
- /react
- /flutter
- /elm
- /vscode
- /ash
- /opensuse
- /html
- /centos
- /php
- /deepseek
- /zig
- /scala
- /textmate
- /lisp
- /sublime-text
- /nixos
- /debian
- /react-native
- /agda
- /kubuntu
- /arch-linux
- /ubuntu
- /django
- /revery
- /manjaro
- /spring
- /nodejs
- /diversity
- /lua
- /julia
- /slackware
- /c
- /markdown