我如何回忆上一个bash命令的参数? [英] How can I recall the argument of the previous bash command?

查看:115
本文介绍了我如何回忆上一个bash命令的参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Bash中有一种方法可以回忆上一个命令的参数。



我通常做 vi file.c 后跟 gcc file.c



Bash中有没有办法回忆上一个命令的参数。

解决方案

可以使用 $ _ !$ 调用上一个命令的最后一个参数。 / p>

此外, Alt +。可用于调用任何先前命令的最后一个参数。


Is there a way in Bash to recall the argument of the previous command?

I usually do vi file.c followed by gcc file.c.

Is there a way in Bash to recall the argument of the previous command?

解决方案

You can use $_ or !$ to recall the last argument of the previous command.

Also Alt + . can be used to recall the last argument of any of the previous commands.

这篇关于我如何回忆上一个bash命令的参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆