- 论坛徽章:
- 23
|
原帖由 hwxo 于 2008-8-13 11:39 发表 ![]()
[root@monitor perltest]# echo 111 323 543 4
111 323 543 4
[root@monitor perltest]# !:2-3:p
323 543
怪怪的。
man bash
! 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'.
!string
Refer to the most recent command starting with string.
!?string[?]
Refer to the most recent command containing string. The trail-
ing ? may be omitted if string is followed immediately by a new-
line.
^string1^string2^
Quick substitution. Repeat the last command, replacing string1
with string2. Equivalent to ``!!:s/string1/string2/'' (see Mod-
ifiers below).
!# The entire command line typed so far. |
|