10 tips for making Bash a sane programming language

Staff Data Engineer
Apr. 22, 2018
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
1 of 20

More Related Content

What's hot

Hacking ansibleHacking ansible
Hacking ansiblebcoca
Webrtc mojoWebrtc mojo
Webrtc mojobpmedley
Yurii Bodarev - OTP, Phoenix & Ecto: Three Pillars of ElixirYurii Bodarev - OTP, Phoenix & Ecto: Three Pillars of Elixir
Yurii Bodarev - OTP, Phoenix & Ecto: Three Pillars of ElixirElixir Club
Web Audio API + AngularJSWeb Audio API + AngularJS
Web Audio API + AngularJSChris Bateman
GenStage and Flow - Jose Valim GenStage and Flow - Jose Valim
GenStage and Flow - Jose Valim Elixir Club
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...Arc & Codementor

Similar to 10 tips for making Bash a sane programming language

Unix 5 enUnix 5 en
Unix 5 enSimonas Kareiva
Perl basics for PentestersPerl basics for Pentesters
Perl basics for PentestersSanjeev Kumar Jaiswal
Web 8 | Introduction to PHPWeb 8 | Introduction to PHP
Web 8 | Introduction to PHPMohammad Imam Hossain
PHP PPT FILEPHP PPT FILE
PHP PPT FILEAbhishekSharma2958
Course 102: Lecture 8: Composite Commands Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands Ahmed El-Arabawy
Debugging: Rules And Tools - PHPTek 11 VersionDebugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionIan Barber

More from Yaroslav Tkachenko

Streaming SQL for Data Engineers: The Next Big Thing?Streaming SQL for Data Engineers: The Next Big Thing?
Streaming SQL for Data Engineers: The Next Big Thing?Yaroslav Tkachenko
Apache Flink Adoption at ShopifyApache Flink Adoption at Shopify
Apache Flink Adoption at ShopifyYaroslav Tkachenko
Storing State Forever: Why It Can Be Good For Your AnalyticsStoring State Forever: Why It Can Be Good For Your Analytics
Storing State Forever: Why It Can Be Good For Your AnalyticsYaroslav Tkachenko
It's Time To Stop Using Lambda ArchitectureIt's Time To Stop Using Lambda Architecture
It's Time To Stop Using Lambda ArchitectureYaroslav Tkachenko
Bravo Six, Going Realtime. Transitioning Activision Data Pipeline to StreamingBravo Six, Going Realtime. Transitioning Activision Data Pipeline to Streaming
Bravo Six, Going Realtime. Transitioning Activision Data Pipeline to StreamingYaroslav Tkachenko
Apache Kafka: New Features That You Might Not Know AboutApache Kafka: New Features That You Might Not Know About
Apache Kafka: New Features That You Might Not Know AboutYaroslav Tkachenko

More from Yaroslav Tkachenko(17)

Recently uploaded

ROAD TO NODES - Intro to Neo4j + NeoDash.pdfROAD TO NODES - Intro to Neo4j + NeoDash.pdf
ROAD TO NODES - Intro to Neo4j + NeoDash.pdfNeo4j
BMC Software.pptxBMC Software.pptx
BMC Software.pptxCloudaction
A sighting of sequence function in Practical FP in ScalaA sighting of sequence function in Practical FP in Scala
A sighting of sequence function in Practical FP in ScalaPhilip Schwarz
MicroK8s 1.28 - MicroCeph on MicroK8s.pdfMicroK8s 1.28 - MicroCeph on MicroK8s.pdf
MicroK8s 1.28 - MicroCeph on MicroK8s.pdfKonstantinos Tsakalozos
Dido_Grigorov_Zurich_2020.pdfDido_Grigorov_Zurich_2020.pdf
Dido_Grigorov_Zurich_2020.pdfPlamenaDzharadat
Test Automation at Scale: Lessons from Top-Performing Distributed TeamsTest Automation at Scale: Lessons from Top-Performing Distributed Teams
Test Automation at Scale: Lessons from Top-Performing Distributed TeamsApplitools

10 tips for making Bash a sane programming language

Editor's Notes

  1. Intro
  2. - Bash is hard (not a typical PL) and weird
  3. Quotes help to prevent issues with spaces (for example) filenames Brace expansion (curly braces) are very helpful for various string manipulations
  4. Don’t need to write “function” anymore (legacy) Use some way to namespace your functions (for example, underscore)
  5. - Double square brackets generally offer cleaner syntax, you don’t need to escape anything inside and they also provide some additional features (like pattern matching or Regex expressions)
  6. - Make sure to define something like BINPATH variable to be able to always call script correctly from any directory - Include itself is not always a best practice (due to security concerns and the fact that scripts includes EVERYTHING, there are no private variables/functions in bash)