[Bash Tricks]: Editing wrongly typed command

 

We often used to type a lengthy command and realize the error after running the command. To correct this error, either we used to re-type the whole command or edit (after up arrow). This can be easily handled with bash tricks by using ‘^’.

Example:

Note the wrong spell ‘loong’ in destination path. To resolve this, either we used to re-type the whole command or edit the spell for correct destination.

The above can be done in one liner bash tricks as below.

Here is the working video of  Editing wrongly typed command

-

No Comment

Please Post Your Comments & Reviews

Your email address will not be published. Required fields are marked *