I have a service that copy the selected file's paths and put them on the clipboard.
It kinda works, except everything gets printed twice.
The service is like this: Get selected files from Finder > run script (as arguments) > copy to clipboard.
The script is:
for f in "$@"
do
echo $f | cut -c 34-
done
I cut some starting characters because I need the path relative to some specific folder, and the size is always the same. I need this to submit the files I changed when committing files to a svn.
Here's an example, I selected three files, ran the service and this is the output:
layouts_index/f1/cadastro/confirmar.php
layouts_index/f2/cadastro/confirmar.php
cadastro/confirmar.php
layouts_index/f1/cadastro/confirmar.php
layouts_index/f2/cadastro/confirmar.php
cadastro/confirmar.php
Is this a problem in the script? Is there a way to fix it using the script or do I need applescript?
Thanks in advance.