Hi all
On my RPi I have a file called DeviceName.txt, which contains the name of the current RPi board.
This file contains a single word in it, without enters or spaces.
I need to read the content of this file to a variable,
and currently I am doing it like this:
It works,
but I am curious:
are there other ways to achieve it in addition to $(cat DeviceName.txt)?
Thank you
On my RPi I have a file called DeviceName.txt, which contains the name of the current RPi board.
This file contains a single word in it, without enters or spaces.
I need to read the content of this file to a variable,
and currently I am doing it like this:
Code:
export MachineID=$(cat DeviceName.txt)
but I am curious:
are there other ways to achieve it in addition to $(cat DeviceName.txt)?
Thank you
Statistics: Posted by spaceman5 — Fri Aug 30, 2024 3:14 pm — Replies 0 — Views 9