Member-only story
Bash Scripts with Arguments
Make your Mac great again. With full example code!
Difficulty: Beginner | Easy | Normal | Challenging
Sooner or later you’re going to find a command line utility that help you write your code. An example of this is SwiftLint, a tool that I used as a command line tool due to the security restrictions at a bank.
This guide helps you to write a bash script — with arguments — that you can use in your terminal to create an animated GIF from a movie file.
Prerequisites:
- Some knowledge of the Mac terminal (guide HERE)
- This tutorial is going to use VIM (guide HERE), but you could use any text editor
Terminology
Bash: “Bourne again shell”. There are many shells that can run UNIX commands, and the one used on the Mac Terminal is Bash
Command line: An interface for interacting with the operating system
Shebang: A String at the beginning of a script to indicate execution
Shell: A user interface for accessing an operating system’s services
Terminal: A command line interface to control the UNIX-based operating system that underlies the Mac