You can use
<M-.>(or<Esc>. if your Meta key is being used for something else), that is, Meta-dot (or Esc-dot), where Meta is usually the Alt key, to recall the last argument of the previous command. So, first you would typegrep foo /usr/share/dict/american-englishAnd then if you wanted to grep for something else, you would type
grep barAfter typing a space and then Esc. (that is, first pressing the escape key, and then the period key):
grep bar /usr/share/dict/american-englishYou can also use either of the following:
grep bar !:2 grep bar !$Where
!:2and!$mean “second argument” and “last argument” respectively.