Introduction
String variables let you store words or sentences to use later in your script.
variable_name="your text here"name="Alice"greeting="Hello, world!"path="/home/user/docs"#!/bin/bash name="Bob" greeting="Hello, $name!" echo "$greeting"
Hello to a variable named greeting in bash?name in bash?$name correctly. echo name prints the literal word 'name'. The other options use invalid symbols.name="Alice" echo "Hello, $name!"
name is assigned the string "Alice".$name is replaced by its value "Alice".message = "Hi there" echo $message
message = "Hi there" has spaces around =, causing a syntax error.fullname and then print it. Which script correctly does this?echo $fullname to print the stored string value.Pass the test and this pattern moves unknown