2 ms·
I don't know how consistent this is across shells, but at least in bash putting a space before the command keeps it out of the history: $ ONE=1 $ TWO=2
by Izkata 1y ago
I don't know how consistent this is across shells, but at least in bash putting a space before the command keeps it out of the history:
$ ONE=1
$ TWO=2
$ echo $ONE $TWO
1 2
$ history | tail -n 4
2002 clear
2003 ONE=1
2004 echo $ONE $TWO
2005 history | tail -n 4
- johnisgood 1y agoYeah, I have been using this feature of bash ever since its existence and it is quite handy at times, especially when I do "printf "<sensitive data>" | qr".