Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How do I reuse previous arguments in reverse order in Bash?
How do I do this in one line reusing and reversing the arguments? Also what’s the syntax to create a function that will do this?
mv newname.js oldname.js
git mv oldname.js newname.js
for example to make a folder then cd into it you
mkdir new-folder-name && cd $_
is it something like
mv newname.js oldname.js && git mv $2 $1
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×