Answer the question
In order to leave comments, you need to log in
How to copy the current folder in .sh?
I need to use the NAME variable in the file, and copy the current folder (where the script is located) to the dir for example ../clones/NAME
Answer the question
In order to leave comments, you need to log in
cp ./* ../clones/NAME
will copy all the files in from the working directory (this is either where the script was run, or the directory in the last cd command)
will print an info message to each subdirectory in the working directory
and
will copy the files of the working directory and will also bypass all subdirectories and copy their contents - in general all that is.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question