Announcement
Collapse
No announcement yet.
EngineerMan
Collapse
This topic is closed.
X
X
-
Nice tricks indeed! I had completely forgotten about using "!!" to repeat the last command. I'm not sure how useful using "fc" is to edit the last command, though. I mean, if you're going to edit the command, it seems just as easy to press the UP key and edit it right there anyway - the forward and back keys work to move through the command while leaving the other chars in place.
- Top
- Bottom
Comment
-
Originally posted by revmacian View Post... if you're going to edit the command, it seems just as easy to press the UP key and edit it right there anyway...
(!! and the similar !$ are ancient tricks from the C shell, I guess from about 1980. !! is short for !-1, and !-2 (the second before this), !-20, (the twentieth), !bob (the last starting with bob) and so on. I have the command number in the prompt, and "r" aliased to "fc -s", so "r 44" repeats number 44 in the history immediately, and !44 lets me adjust it first.)Regards, John Little
- Top
- Bottom
Comment
-
Originally posted by jlittle View PostYeah... but sometimes a proper editor's power can be useful. I often type long commands, usually starting smallish and getting large, and getting around them with the arrow keys can be slow.
Originally posted by jlittle View Post(!! and the similar !$ are ancient tricks from the C shell, I guess from about 1980. !! is short for !-1, and !-2 (the second before this), !-20, (the twentieth), !bob (the last starting with bob) and so on. I have the command number in the prompt, and "r" aliased to "fc -s", so "r 44" repeats number 44 in the history immediately, and !44 lets me adjust it first.)
- Top
- Bottom
Comment
-
Originally posted by whatthefunk View PostNice tricks! I like the temp ram disk idea. Im going to be using that one a lot I think,
I've been using Linux since 1998 and half of those CLI commands I was not familiar with. *facepalm*
I've bookmarked his channel and have watched a couple others as well. That guy is very sharp!
So is pythonprogrammer, a PhD Physicist who uses Anaconda & Python to do a lot of his data analysis. He pushes "data science" a lot."A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
– John F. Kennedy, February 26, 1962.
- Top
- Bottom
Comment
-
Originally posted by revmacian View Post... I mean, if you're going to edit the command, it seems just as easy to press the UP key and edit it right there anyway - the forward and back keys work to move through the command while leaving the other chars in place.
My 79 year old brain can't remember ever learning !! or fc or half of his other tricks."A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
– John F. Kennedy, February 26, 1962.
- Top
- Bottom
Comment
-
Originally posted by GreyGeek View Post... using the grep command to pipe specific search results: "history | grep someword"Regards, John Little
- Top
- Bottom
Comment
Comment