Reputation: 1
I want to use the !!
, !$
,^abc^cde
, etc. aliases in a bash script.
Sadly, I cant seem to make them work in a script (They work just fine in interactive mode),
Does anybody know what the problem is? If this can not be done, do you know about anything that operates in a similar way that can be used in a bash script?
Upvotes: 0
Views: 64
Reputation: 6163
Use set +o histexpand
to enable history expansion in non-interactive bash shells.
Upvotes: 1