I learned that I can use cat to show the contents of a file in grub.cfg. I want to set a variable according to the content, first I set the filename like this:
GRUBENV="(hd2,$i)/config.tag"
cat $grubenv
rund successfully.
but this gives me errors:
full=$( cat "$grubenv" )
What went wrong?
Thanks in adavance.
F. :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Grub provides the shell-like syntax, but it does not 100% the same as bash.
I do not know if such a function you need exists. If you find the solution, please share it.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I learned that I can use cat to show the contents of a file in grub.cfg. I want to set a variable according to the content, first I set the filename like this:
GRUBENV="(hd2,$i)/config.tag"
cat $grubenv
rund successfully.
but this gives me errors:
full=$( cat "$grubenv" )
What went wrong?
Thanks in adavance.
F. :-)
Grub provides the shell-like syntax, but it does not 100% the same as bash.
I do not know if such a function you need exists. If you find the solution, please share it.
Steven