Categories
How to assign data from a file to a variable?
For example, there is a data.txt file that says (123456) I need to assign this data to the $dat variable
Answer the question
In order to leave comments, you need to log in
#!/bin/bash dat=$(cat data.txt) echo "$dat"
I watch mom's coolhazers don't even try to google
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question