I have an array of values $dates that I’m transforming:
for i in $dates
do
date -d "1970-01-01 $i sec UTC" '+%a_%D'
done
Is there a way to save the result of this operation so I can pipe it to something else without writing it to a file on disk?
Create a function:
Then you can e.g. send the output to standard error: