I need to to this operation automaticaly:
$ ls
this_folder
$ cp -rf this_folder/* .
For this I need to store in a variable the value of the “ls” so that I do something like this:
$ ls
this_folder
$ cp -rf $value_of_the_ls/* .
It is possible to do this? Give me some clues.
Best Regards,
To set the output of a command into a variable, use command substitution like this:
Have you thought about what you will do if there are multiple files in the current directory in which case
lswill return multiple files?