首页 > 其他 > 详细

Bash Bang (!) commands(bash的“!”命令,重新运行前一个命令的全部或部分。)

时间:2020-07-22 14:41:53      阅读:90      评论:0      收藏:0      [点我收藏+]

Re-run all or part of a previous command.

Syntax
      !!       Run the last command again

      !foo     Run the most recent command that starts with ‘foo‘ (e.g. !ls)

      !foo:p   Print out the command that !foo would run
               also add it to the command history

      !$       Run the last word of the previous command (same as Alt + .)

      !$:p     Print out the word that !$ would substitute

      !*       Run the previous command except for the last word

      !*:p     Print out the previous command except for the last word

     ^foo^bar  Run the previous command replacing foo with bar

转载自:https://ss64.com/bash/bang.html

Bash Bang (!) commands(bash的“!”命令,重新运行前一个命令的全部或部分。)

原文:https://www.cnblogs.com/jacen789/p/13359686.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!