Use cat to merge chapters of an audiobook or other multipart files you may prefer to consolidate. You might proceed as follows:

Create a temporary directory for the files to concatenate

cd to the directory in Terminal

Use the wildcard (*) to merge the files in the order in which they appear in the directory, and > redirection to create a single file, e.g.:

% cat * > xxx.mp3

If you've got a heap of files and don't feel like mousing, set up a subfolder as the working directory inside the folder with the files to concatenate. You can then wildcard the files to the working directory subfolder with something like this:

% mv ../abc* ./

When finished, move the merged file to the parent directory with mv xxx.mp3 ../, then delete the parts in the working directory with rm *. It's a good idea to back up the files before you begin -- otherwise, you may rm away your material inadvertently.

Keep in mind that you'll be merging your ID3 tags together too. If you have a tool to strip all tags before you cat them together, you'll be in better shape, standards speaking.

Pretty much all modern players know to ignore garbage in the middle of the file, but some older (especially hardware based) players may either chirp when they get to the merge points or just stop playing all together.

If you're merging tracks that lived in iTunes, odds are there's an ID3v1.x tag on the end of each track (128 bytes long) and an ID3v2.x tag on the front which could be several KB if there's album art, lyrics, or any of the longer IDv2 elements included.

Note that the first command uses > which just redirects the output to a file (overwriting it if it already exists). Subsequent commands use >> which appends the data to the end of the file.
Basic Unix stuff, but handy nevertheless!

You can split an MP3 track using any number of programs. The first to spring to mind is QuickTime Pro. Open the long MP3, select only the area you want, copy, paste it in a new player and save it. Repeat for all "segments".

I use 'cat' to join quicktime movies all the time. If I have a movies that will not fit on a single CD then I split them using the 'split' command to burn them and then join them back together using 'cat':

The command
cat * >xx
when executed using tcsh, first creates the file xx, then
expands "*" to include xx, then does the copy. The contents
of xx will be copied into itself forever. I just made a 100 MB file
in a few seconds that way.

In bash, apparently "*" is expanded before xx is created, but if
xx already exists the same disastrous copy-to-self happens.

A better way is to place the output somewhere else temporarily:
cat * >/tmp/xx ; mv /tmp/xx .
Alternatively, replace "*" by a pattern that more explicitly identifies
the input files without matching the output file.

Thanks for the caveat, Brendon, and sorry the hint ran wild. Another option:

cat * > ../xxx

That puts the merged file in a parent directory to avoid the tcsh endless loop. Incidentally, though perhaps too basic to mention, note that enclosing the filename in quotation marks allows for long names, as in "xxx yyy zzz.mp3"

I've been looking for a way to join aif files and have tried this a number of different ways (cat file1.aif file2.aif >> file3.aif, and cat file1.aif > file3.aif ; cat file2.aif >> file3.aif), and while the resulting file is the expected size, when I open it (in Amadeus Pro) it only shows the content from the first file. Do I have to ignore the header of the second file? There is no such option in cat.

I tried it with rtf files with the same results. The content from the second file is missing. It worked with an ls command (ls > file1 ; man cat > file2 ; cat file1 file2 >> file3). What am I doing wrong that it won't work with .aif or .rtf?

There's something wrong with the concatenated file as you suggest dcottle, but I don't know what it is. Neither iTunes nor Quicktime can see past the first file's length in the resulting file. If I open that file in Fission, then save over the audio without changing anything, THAT file is readable normally by quicktime/iTunes. It's my best workaround for the problem that I don't have the expertise to fathom. Any expert tweeks to this thread to make it not suffer from this serious problem would be appreciated. I'm unable to understand how it could work effectively for anyone... Perhaps it's a more recent version of quicktime that's not reading the headers the way it used to???