I have a question which is super simple, but I just can't wrap my head around it. Regarding the following command line:
for foo in *.dist; do cp $foo `basename $foo .dist`; done
I know it takes all files in the current directory which have .dist as an extension, copies them and in the same step removes the .dist extension (I have grapped it from a wiki post regarding the installation of OTRS under Ubuntu Server). I just want to understand WHY it is doing this.
Thank you very much.