Assuming that there are no spaces or the like in any of your filenames, there are a couple of ways of doing this. One is just to use an array:
files=( $(find -mtime -2) )
files will be an array of all the paths output by
find in order, indexed from zero. You can get whichever lines you want out of that. Here I've saved the second and third lines into
b, but you could use the array elements directly too.
An alternative if you have GNU find or another with the
printf option is to use it in combination with
read and process substitution:
read junk a b junk < <(find -printf '%p ')
This one turns all of
find's output into a single line and then provides that line as the input to
read, which saves the first word (path) into
junk, the second into
a, the third into
b, and the rest of the line into
Similarly, you can introduce the
paste command for the same effect on any POSIX-compatible system:
read junk a b junk < <(find -mtime -2 | paste -s)
paste -s will convert its input into a single tab-separated line, which
read can deal with again.
In the general case, if you're happy to execute the main command more than once (not necessary here), you can use
find | sed -n 2p
That will print only the second line of the output, by suppressing ordinary output with
-n and selecting line 2 to
print. You can also stitch together
tail for the same effect, which will likely be more efficient in a very long file.
All of the above have the same effect of storing the second and third lines into
b, and all still have the assumption that there are no spaces, tabs, newlines, or any other characters that happen to be in your input field separator (
IFS) value in any of the filenames.
Note though that the output order of
find is undefined, so "second file" isn't really a useful identifier unless you're organising them to be ordered some other way. It's likely to be something close to creation order in many cases, but not all.