Hi guys
I am trying out a theory to auto scan USB and Firewre drives with Sophos Anti-Virus
when i carry out a ```
sweep /Volumes/RALLY2 64GB/
i can see the test vicar virus being picked up here like this
>>> Virus 'EICAR-AV-Test' found in file /Volumes/RALLY2 64GB/eicar.com.txt
What i am thinking is to just get the /Volumes/RALLY2 64GB/eicar.com.txt to pass it on to a variable for another command
This is what i have so far but it doesn't look very elegant
sweep /Volumes/RALLY2 64GB/ | grep ">>> Virus" | cut -d"'" -f3 | cut -c 16-
```
This gives me the result i need
/Volumes/RALLY2 64GB/eicar.com.txt
Does anyone have any suggestions i can use to clean it up a bit?
Thanks
