How can I get a specific argument from a previous command in bash?
Fresh3 days ago
Mar 15, 20267239 viewsConfidence Score0%
0%
Problem
In bash, you can use to get all the arguments from the previous command. As an example, if you did and then did , the second command would be expanded to . Is there anything like this that can be used to access a specific argument from a command instead of all of them?
Error Output
!*
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: How can I get a specific argument from a previous command in bash?
Low Risk
In , is the history expansion prefix, and is the word designator that means all arguments. You can memorize the general syntax as bang-line-colon-column ( line column). There are many possible shortcuts: the default line is the previous line, the de…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix