2007-03-01 シェル変数をスタック代わりに使う bash $ a=":a/b/c:d/e/f:g/h/i"; echo ${a%:*} :a/b/c:d/e/f a=":a/b/c:d/e/f:g/h/i"; echo ${a##:*:} g/h/i