-
Senior Member
registered user
Why the "!" history feature doesn't work in knoppi
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.
-
Senior Member
registered user
Re: Why the "!" history feature doesn't work in kn

Originally Posted by
maxIT
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 "!"?
That is incorrect usage because man history clearly says that "!" only starts a history substitution when not followed by a blank, newline, = or (
! 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'.
At least on Knoppix 4.0.2 CD history expansion works as expected:
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
-
Senior Member
registered user
Oh me stupid! Thanks!
Maybe I was confused after reading somewere on the net something like: "type ! to repeat the last bash command"
Similar Threads
-
By carolus in forum General Support
Replies: 0
Last Post: 04-29-2008, 10:28 PM
-
By benny_mott in forum Hardware & Booting
Replies: 0
Last Post: 11-14-2006, 10:11 PM
-
By ockham23 in forum Knoppix DVD
Replies: 0
Last Post: 08-28-2005, 11:02 AM
-
By metavoid in forum Customising & Remastering
Replies: 0
Last Post: 08-31-2004, 11:13 PM
-
By Juny in forum General Support
Replies: 4
Last Post: 03-14-2003, 09:02 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 32GB RAM No HDD
$378.93

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD
$275.00

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb
$374.99

Dell PowerEdge R240 Intel Xeon E-2224 3.50GHz 8GB DDR4 ECC NO HDD 250W
$285.97

Dell Poweredge R810 4x Xeon X7560 2.26ghz 32-Cores | 256GB | 3x Trays | H700
$289.99

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD
$149.99

Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2690 v3 | 64gb Ram | 2x 1600W
$524.99

Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W
$409.99

Dell PowerEdge R530 2x E5-2630v4 H330 iDRAC8 Port Card Riser No PSU/RAM/HDD
$99.99

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores | 32gb | HBA330 | 2x 1...
$324.99