Hello I'm trying to save a text file(let's call it file.dat (it's a UTF-8 Unicode text) into a variable in a script I'm making. I want to call the file.dat like : ./myscript file.dat (or something similar). Having a command line in code in the form of variable=file.dat won't help.
I'm new to shell so I apologize if the question is not very specific
var=$(<"$1")should work inbash