$ echo $BASH_VERSION 3.2.48(1)-release $ echo $(fc -nl -1) echo $BASH_VERSION
$ echo $BASH_VERSION 4.0.10(2)-release $ echo $(fc -nl -1) echo $(fc -nl -1) I see there were a lot of changes to fc, is this intended or a bug? It seems there is another way to get the last history entry that works the same in command substitution regardless of 3.2 vs 4.0: $(history -p '!!') - Ian Kelling