|
|
There are two ways:
myvar=`cat /etc/motd`
myvar=$(cat /etc/motd)
Choose either then then try this:
echo $myvar
Source: https://foxhop.net/f3f1d8ba-2f95-11f1-8421-e86a64d24d78/bash-command-substitution
Snapshot: 2026-11-10T17:03:31Z
Generator: Remarkbox 79fc4fc