Currently, I use this command to make tar.gz archives:
sudo tar -zcpvf archive.tar.gz directory1 directory2 directory3
Is there a way to compress multiple archives like above, but instead of compressing regular folders, have tar make sub tar.gz files? So, for example, I want to be able to make archive.tar.gz and see it contain directory1.tar.gz, directory2.tar.gz and directory3.tar.gz on the first level folders only.
I know I can compress directory1, directory2, and directory3 individually and then add them to another archive, but is there a way to do what I'm asking with one command?