I am writing a shell script where I need to change permissions to the extracted set of files and folders from a double zipped tarball.
My code line is:
gzip -dc <file.tar.gz> | tar -tvzf - | cut -d"/" -f3 | uniq | xargs chmod -R 755
but the tarball extract is in the other folder. How can I append the path to the extracted folder from uniq
and change the permission?