grub_script_echo1.in 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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. echo "one two three"
  22. echo "one two three"
  23. echo "one two three"
  24. # empty arguments
  25. echo a "" b
  26. echo a '' b
  27. echo a $foo b
  28. echo a ${foo} b
  29. echo a "$foo" b
  30. echo a "${foo}" b
  31. # multi-part arguments
  32. echo one"two"three
  33. echo one${two}three
  34. echo one"two"$three
  35. echo one'two'three
  36. echo one${two}three
  37. echo one'two'$three
  38. echo one'two'three"four"five${six}seven$eight
  39. foo=bar
  40. echo $foo ${foo}
  41. echo "$foo" "${foo}"
  42. echo '$foo' '${foo}'
  43. echo a$foob a${foo}b
  44. echo ab"cd"ef$foo'gh'ij${foo}kl\ mn\"op\'qr\$st\(uv\<wx\>yz\)
  45. foo=c
  46. bar=h
  47. echo e"$foo"${bar}o
  48. e"$foo"${bar}o hello world
  49. foo=echo
  50. $foo 1234
  51. echo "one
  52. "
  53. echo "one
  54. \""
  55. echo "one
  56. two"
  57. echo one"two
  58. "three
  59. echo one"two
  60. \""three
  61. echo one"two
  62. \"three\"
  63. four"
  64. echo 'one
  65. '
  66. echo 'one
  67. \'
  68. echo 'one
  69. two'
  70. echo one'two
  71. '
  72. echo one'two
  73. \'
  74. echo one'two
  75. \'three
  76. echo "one\
  77. "
  78. echo "one\
  79. \""
  80. echo "one\
  81. two"
  82. # echo "one\
  83. # two"
  84. # echo 'one\
  85. # two'
  86. # echo foo\
  87. # bar
  88. # \
  89. # echo foo
  90. # echo "one
  91. #
  92. # two"
  93. echo "one
  94. "
  95. echo "one
  96. \""
  97. echo "one
  98. two"
  99. echo one"two
  100. "three
  101. echo one"two
  102. \""three
  103. echo one"two
  104. \"three\"
  105. four"
  106. echo 'one
  107. '
  108. echo 'one
  109. \'
  110. echo 'one
  111. two'
  112. echo one'two
  113. '
  114. echo one'two
  115. \'
  116. echo one'two
  117. \'three
  118. echo "one\
  119. "
  120. echo "one\
  121. \""
  122. echo "one\
  123. two"
  124. echo one \
  125. two
  126. echo one x\
  127. two
  128. echo one x\
  129. "x" two
  130. echo one x\
  131. 'x' two
  132. echo one x\
  133. \\ two
  134. echo one x\
  135. \
  136. x
  137. echo one x\
  138. echo one x\
  139. ;
  140. echo one x\
  141. $var
  142. if test x$grubshell = xyes; then insmod regexp; fi
  143. echo /boot/grub/i386-pc/normal.mod
  144. echo x\\y
  145. echo x\*y
  146. echo x\\
  147. echo x\\\\
  148. echo x\\\\y