I'm changing (trying to anyway) a script that will need to unrar a file, this file will create a directory with files in it. Then I need to change the owner ship and permission on that directory. Finally, I will rsync the directory to another machine.
This is what I have so far.
#!/bin/bash
###Grab the name of the .trz file and unzip
echo -e "Enter the name of the patch file: \c"
read file
tar -zxf $file
##### This is where I'm stuck, not sure what the next step is.
####Below was the original script that would rsynce the directory if the permissions were already set and the file was already untarred####
echo -e "Please enter the directory of patch (exclude trailing slash) : \c"
read patch
rsync -rpvgo --force $patch
user@somemachine.com:/srv/patches
rsync -rpvgo --force $patch
user@somemachine.com:/srv/patches