I currently have a Unix script (written in bash) that executes several commands to modify a group of files, which I specify with an flist containing their paths. The general idea of the script is to create a directory, place files from the flist in that directory, and then perform the subsequent processes, a few of which are creating more directories.
The issue that I have with this is that I must specify the exact file path of where I want the directories to be located within the script itself. So, my question is: is there a way to write the script such that I can enter the command and then the path of the destination folder of where I would like the script executed on the command line and have the initial and all subsequent directories created by the script within the initial directory without having to supply any of their paths (i.e. 'command /destination/path/for/script/')?
Apologies if this is a bit long-winded. I’m quite new to Unix and have very little experience (and consequently could not come up with better wording). Any assistance is appreciated!