It comes down to being able to save the `dynamic output` (I'll explain) of terminal into a text file, but here's what I'm ultimately seeking.

I created a custom command for terminal called `playRandom`, what it does is that it plays random songs forever. The bash file I created for this:

```
#!/bin/bash 
find ./ -type f | sort -R | xargs -I + play +

```

Note: The `play` command is from [SoX](https://en.wikipedia.org/wiki/SoX) software.

Now the output looks something like this:

![playRandom command](https://i.stack.imgur.com/QKInc.png)

As you can see the output changes `dynamically`, so I cannot use `>>` to save the output.

I want to be able to save 'names of songs that are played' into a text file.

How can I achieve this goal? Thanks in advance.