In a single command how do you run the previous command in
the command prompt.
Answers were Sorted based on User's Feedback
Answer / kalaivani
type "r". It will execute the last executed command
Is This Answer Correct ? | 7 Yes | 2 No |
Answer / anjan raha
!!
It will display previous executed command
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / namrata
Using Dot(.)It will execute the last executed command.
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / joker
!! will execute the last command
!-1 will execute the 2nd command from last
Few other tricks:
-----------------
If you are not sure you can see what is the command rather than executing by
!!:p
!-2:p
and later just do !!
If you want to run the last command with little modification use substitution
!!:s/old/new
example:
>vim test
>!!:s/test/abcd/:p
vim abcd
Thanks,
Joker
Is This Answer Correct ? | 0 Yes | 0 No |
What is the use of "shift" command in passing parameters?
is there any command to find user password?
Is it possible to substitute "ls" command in the place of "echo" command?
What is a shell made of?
write a shell script to check whether all the directories in the path exist has read and write permission
if i have 2 files file1 and file2.... file1 contains 2 columns like b a 11 aa 12 as 13 ad 15 ag 11 ar 13 ah 15 ak file2 contains b c 10 ds 11 at 15 gh 15 jk 13 iu 11 fg 13 yy can any 1 give me the program to display in this way? a b c aa 11 at ar 11 fg ad 13 iu ah 13 yy ag 15 gh ak 15 jk
what is the difference between writing code in shell and editor?
write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?
What is egrep?
Why we are writting shell scripts? Plz if possible explain it briefly.
How do you schedule a command to run at 4:00 every morning?
What is shell and terminal?