Create a script - Hello World using variables

Create a new file called with the following content and give it executable permissions with chmod +x

Execute/Run via: ./

#!/usr/bin/env bash
whom_variable="World" printf "Hello, %s\n" "$whom_variable"


# The spaces cannot be used around the `=` assignment operator
# Use printf to safely output the data

Was this answer helpful? 0 Users Found This Useful (0 Votes)