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
-
Yeah... 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 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
-
That's a very good point!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.
I seriously need to try that.. sounds quite useful.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
-
That and the "!!" trick as well.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
-
That's what I've been doing, and using the grep command to pipe specific search results: "history | grep someword"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
-
That's a good point. The command line has accumulated so many tricks over so many decades one has to be choosy about which tools one keeps in the toolbox to hand. I've set up shell functions that have recorded every command I've typed, timestamped, for the last several years in a history directory and often I just run grep in that directory.Originally posted by GreyGeek View Post... using the grep command to pipe specific search results: "history | grep someword"Regards, John Little
- Top
- Bottom
Comment
Users Viewing This Topic
Collapse
There are 0 users viewing this topic.






Comment