List All Files in USB device from /Volumes Shell Script
Since you only want find to act on USB block devices the following is an example of using information reported by System Profiler to get the Mount Point of any attached and mounted USB block device.  By doing it this way it doesn't matter what other mount points exist under /Volumes nor does it matter what the USB block device name is as it's ascertained from System Profiler not the ls command.

I've modified the code, once again, removing the compound command line as it not likely it would be run that way anyway and is easier to maintain in script form while adding the ability to handle spaces in the label name of the USB block device.

By temporarily changing the Internal Field Separator $IFS, adding IFS=$'\n' to the script will ignore the space(s) as a separator in the output of grep when passed to find.  So as not to mess with any code in the rest of your script I fist get the state of $IFS and then rest it afterwards.

In a bash script:

#!/bin/bash

_ifs="$IFS"
IFS=$'\n'
for p in $(system_profiler SPUSBDataType | grep -oE '/Volumes/.*$'); do
    if [ -n "$p" ]; then
        find "$p"/*
    fi
done &gt;&gt; filename.txt 
IFS="$_ifs"


The system_profiler SPUSBDataType outputs info on the USB Bus and pipes it through grep to get /Volumes/$whatever e.g. /Volumes/USB Drive using -oE for the '/Volumes/.*$' which outputs /Volumes/ and everything after it to the end of the line, thus '/Volumes/.*$' will translate the fully qualified pathname of the mount point of any mounted USB block devices.  So whatever the USB block device is mounted as, it's assigned to $p (I picked "p" for path) and when used with find I added the /* after it so it would not output the dotfiles.  The if block is there to avoid any output if no USB block devices are mounted.