History expansion is purely an interactive command-line feature; it doesn't work in scripts. If you need to access the history programmatically, use the fc command (or history, which is equivalent to fc -l).
Anyway, that's what you were reading about. :)
--
Mark J. Reed <markjreed@xxxxxxxxx>