grub_script_echo1.in 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #! @builddir@/grub-shell-tester
  2. # Run GRUB script in a Qemu instance
  3. # Copyright (C) 2010 Free Software Foundation, Inc.
  4. #
  5. # GRUB is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # GRUB is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with GRUB. If not, see <http://www.gnu.org/licenses/>.
  17. # simple arguments
  18. echo one two three
  19. echo "one two three"
  20. echo 'one two three'
  21. # empty arguments
  22. echo a "" b
  23. echo a '' b
  24. echo a $foo b
  25. echo a ${foo} b
  26. echo a "$foo" b
  27. echo a "${foo}" b
  28. # multi-part arguments
  29. echo one"two"three
  30. echo one${two}three
  31. echo one"two"$three
  32. echo one'two'three
  33. echo one${two}three
  34. echo one'two'$three
  35. echo one'two'three"four"five${six}seven$eight
  36. foo=bar
  37. echo $foo ${foo}
  38. echo "$foo" "${foo}"
  39. echo '$foo' '${foo}'
  40. echo a$foob a${foo}b
  41. echo ab"cd"ef$foo'gh'ij${foo}kl\ mn\"op\'qr\$st\(uv\<wx\>yz\)
  42. foo=c
  43. bar=h
  44. echo e"$foo"${bar}o
  45. e"$foo"${bar}o hello world
  46. foo=echo
  47. $foo 1234
  48. echo "one
  49. "
  50. echo "one
  51. \""
  52. echo "one
  53. two"
  54. echo one"two
  55. "three
  56. echo one"two
  57. \""three
  58. echo one"two
  59. \"three\"
  60. four"
  61. echo 'one
  62. '
  63. echo 'one
  64. \'
  65. echo 'one
  66. two'
  67. echo one'two
  68. '
  69. echo one'two
  70. \'
  71. echo one'two
  72. \'three
  73. # echo "one\
  74. # two"
  75. # echo 'one\
  76. # two'
  77. # echo foo\
  78. # bar
  79. # \
  80. # echo foo
  81. # echo "one
  82. #
  83. # two"