Joining two audio files

How can I join automatically (not manually = cut and paste) two MP3 audio files (for example, 10 seconds first audio, 10 seconds second audio, 10 seconds first audio, etc.)? Thank you.

What do you mean by “automatically”? SoX is a handy command-line utility that can to this (along with all sorts of other things)

I do not want to manually cut tracks and arrange tracks in 10 seconds intervals. The best solution would be selection of two tracks and determination of length of interval (for example 10 seconds). But command line is fine. With what command can I accomplish my goal? Thank you.

Well it’s still not clear what you are trying to do…

Is the idea you want to make many many repeats of A,B,A,B…?

If you only have to do it once, the I would just do it by hand. First make a clip of 10sec A followed by 10sec B. Then copy the entire clip and paste at the end to make A,B,A,B then copy the whole clip and paste at the end to make A,B,A,B,A,B,A,B and so on to get the length you need.

If you have to do this a lot, then you’re probably going to need to write a shell script (or perl script) to use SoX to make the necessary edits.