Menu

grub.cfg and cat

Help
2019-12-03
2019-12-08
  • Rainer Friedrich

    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. :-)

     
  • Steven Shiau

    Steven Shiau - 2019-12-08

    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

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.