Skip to content

Latest commit

 

History

History
17 lines (17 loc) · 387 Bytes

posix_shell_literacy.md

File metadata and controls

17 lines (17 loc) · 387 Bytes

POSIX Shell Literacy

How to concatenate string variables

foo="Hello"
foo="${foo} World"
echo "${foo}"
> Hello World

In general to concatenate two variables you can just write them one after another:

a='Hello'
b='World'
c="${a} ${b}"
echo "${c}"
> Hello World

credit here