Sample Header Ad - 728x90

using $ arguments on the command line and providing values for them at the end

0 votes
2 answers
211 views
rather than write scripts for every single process I need to do, I like to just save commands in a text file and copy and paste them on the command line. Of course, some of the specifics of the commands change each time I paste and run it. Then I need to arrow thru the command and change the important parts. So, I would like to do something like this. For a simple example:
chmod $1 /home/$2/.bashrc 740 bobsa
Can that be done some way? Is xargs something that can be used for this? I know I can set ENV variables before running the command to attain this but I was hoping from something else I can tac on the end thanks!
Asked by josa (3 rep)
Jul 4, 2020, 04:01 PM
Last activity: Jul 6, 2020, 07:55 PM