Search code examples
bashshelluefi

How to pass string "Hello #" in EFI Shell scripting


I hope EFI Shell script will work similar to Linux scripting languages but its not. Following is my EFI Shell script content,

MyApp.efi "Hello #"

Then i run script.nsh, its executing only following content,

MyApp.efi "Hello

here # missing, its treating comment entries, Please help me, I tried with following combinations also

MyApp.efi '"Hello #"'

For above content its executing ,

MyApp.efi '"Hello


Solution

  • echo "Hello ^#"
    

    You have to escape the # even if it is in a string. Also, this might not work if you have an older version of the EFI Shell.