Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8026

Raspberry Pi OS • Re: Reading the Content of a File to a Variable

$
0
0
export MachineID=$(<DeviceName.txt)
That is a bash-ism though. Not faster enough to be worth getting into the habit of, if you also need to write portable scripts ever.
Which part of the line makes it Bash only?

Statistics: Posted by spaceman5 — Fri Aug 30, 2024 6:37 pm



Viewing all articles
Browse latest Browse all 8026

Trending Articles