Capture of Unix Execute Output

Hi Team,

I’m executing below command in one Unix Execute snap.

cd /OUT | ls -tr | tail -1

The output is a file name, say - ABC_0822.txt

This output file name I want to capture inside a mapper. How to do, please help.

Thanks & Regards,
Subhasree