According to man_history '! Start a history substitution...', but to me it return an error message:
bash: syntax error near unexpected token `newline'
The same behavior also in 'debian sarge' I've noticed.
According to man_history '! Start a history substitution...', but to me it return an error message:
bash: syntax error near unexpected token `newline'
The same behavior also in 'debian sarge' I've noticed.
Did you try to use plain "!"?Originally Posted by maxIT
That is incorrect usage because man history clearly says that "!" only starts a history substitution when not followed by a blank, newline, = or (
At least on Knoppix 4.0.2 CD history expansion works as expected:! Start a history substitution, except when followed by a blank, newline, = or (.
!n Refer to command line n.
!-n Refer to the current command line minus n.
!! Refer to the previous command. This is a synonym for `!-1'.
Code:knoppix@0[knoppix]$ echo One One knoppix@0[knoppix]$ echo Two Two knoppix@0[knoppix]$ ! bash: syntax error near unexpected token `newline' knoppix@0[knoppix]$ !-2 echo Two Two knoppix@0[knoppix]$ !-4 echo One One knoppix@0[knoppix]$ !! echo One One
Oh me stupid! Thanks!
Maybe I was confused after reading somewere on the net something like: "type ! to repeat the last bash command"

HP ProLiant MicroServer Gen8 G1610T @2.3 GHz, 16GB, 712317-001 NO HDD/OS
$199.00
Supermicro 1U Network Server Appliance 16GB RAM 800GB SSD 6 LAN Ports Powers On
$450.00
Nasuni NF-50 Supermicro Server, Atom CPU C2558, @ 2.40GHz, 8GB RAM-No HDD/OS/AC
$250.00
Supermicro CSE-937 3U Storage Chassis No CPU No HDD No Ram Tested & Reset
$129.99
Supermicro 2U X10DRU-i 2x E5-2680 v3 2.5ghz 32gb Ram 240gb SSD 2x GPU *READ*
$369.99
New Barebones Supermicro 5019D Server, 4C/8T Xeon D-2123T, 1U Rackmountable, 10G
$449.99
Supermicro SYS-E302-9A Fanless Firewall Atom C3558 16GB ECC 64GB SSD 6x GbE i350
$325.00
1U Edge Firewall Server X11SCW-F Xeon E-2174G 0 RAM M.2 NVME 3x PCI-e 2x PSU X
$175.00
$280.00
Supermicro CSE-937 3U Storage Chassis No CPU No HDD No Ram Tested & Reset
$129.99