Have you noticed at times that you have been entering same command line parameter over and over again during a certain portion of your shell works?
Have you ever been tired of entering the last command line argument over and over again?
Here's a quick and simple short tip on how to execute shortcut combination keys to make that long-typing parameter words easy to shell redo again.
If you were trying CD into a particular folder like
# cd /home/www/cpanel/com/level2/shared/customers/public_html
bash: cd: /home/www/cpanel/com/level2/shared/customers/public_html: No such file or directory
Now, enter the combination short cut keys for entering the last parameter like so
# mkdir !*
# cd !*
# ls -la !*
The above '!*' would be substituted by /home/www/cpanel/com/level2/shared/customers/public_html when executed by bash.
Subscription
Categories
- HowTos (612)
- Linux Devices (40)
- Linux Diggs (620)
- Linux News (1541)
- Linux Videos (24)
Recent Posts
Blog Archive
-
▼
2008
(2301)
-
▼
March
(8)
- Shell: Shortcut To Last Command Line Argument
- HowTo: Motion Picture Linux Paint and Retouching Tool
- HowTo: Convert First Letter of Dir Folder to Upper...
- HowTo: Lightning Speed Big Claws
- HowTo: Convert First Letter of Text Line to Uppercase
- HowTo: Automatically Change your Fedora Desktop Wa...
- HowTo: Extremely Powerful Linux Password Sniffer
- HowTo: Recover Missing Portmap on Fedora 8
-
▼
March
(8)
Sunday, March 30, 2008
Shell: Shortcut To Last Command Line Argument
Subscribe to:
Post Comments (Atom)
ILoveTux - howtos and news | About | Contact | TOS | Policy
1 comments:
Just a precision: !* is for the last list of arguments; !$ is for the last argument alone:
$ echo a b c
a b c
$ echo !*
echo a b c
a b c
$ echo d e f
d e f
$ echo !$
echo f
f
Post a Comment