Skip to content

Instantly share code, notes, and snippets.

@diogovk
Created July 1, 2014 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diogovk/cb41337616a24842132d to your computer and use it in GitHub Desktop.
Save diogovk/cb41337616a24842132d to your computer and use it in GitHub Desktop.
cd /home/horacio/Documentos/temp/license-vision
while read user ; do
echo $user
cp *.ucl /mnt/appusu/"$user"/Systex5
cp *.uvz /mnt/appusu/"$user"/Systex5
cp *.jar /mnt/appusu/"$user"/Systex5/shell/
cp *.[dD][Ll][Ll] /mnt/appusu/"$user"/Systex5/shell/funcoes/
done < /home/horacio/Downloads/all.bat
appusu='/mnt/appusu/'
app='/Systex5/'
shell='shell/'
funcoes='funcoes/'
user='horacio.f'
files='/home/horacio/Documentos/temp/license-vision/'
file='/home/horacio/Downloads/all.bat'
old_ifs=$IFS
IFS="
"
for line in $(cat $file);
do
user="$line"
echo $user
destino="$appusu$user$app"
cp "$files"*.ucl "$destino"
cp "$files"*.uvz "$destino"
destino="$destino$shell"
cp "$files"*.jar "$destino"
destino="$destino$funcoes"
cp "$files"*.dll "$destino"
cp "$files"*.DLL "$destino"
done
IFS=$old_ifs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment