rewrote arglist to argv conversion and added $@, $* support
This commit is contained in:
parent
01b0317f7b
commit
a0167e8bdf
8 changed files with 392 additions and 213 deletions
|
@ -16,6 +16,33 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# simple arguments
|
||||
echo one two three
|
||||
echo "one two three"
|
||||
echo 'one two three'
|
||||
|
||||
# empty arguments
|
||||
echo a "" b
|
||||
echo a '' b
|
||||
|
||||
echo a $foo b
|
||||
echo a ${foo} b
|
||||
|
||||
echo a "$foo" b
|
||||
echo a "${foo}" b
|
||||
|
||||
# multi-part arguments
|
||||
echo one"two"three
|
||||
echo one${two}three
|
||||
echo one"two"$three
|
||||
|
||||
echo one'two'three
|
||||
echo one${two}three
|
||||
echo one'two'$three
|
||||
|
||||
echo one'two'three"four"five${six}seven$eight
|
||||
|
||||
|
||||
foo=bar
|
||||
echo $foo ${foo}
|
||||
echo "$foo" "${foo}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue