Recently I started experimenting with eyeD3 to manage my large collection of MP3's.
Using the commandline on Linux ('BASH') I want to add comments to MP3's according to this structure:
Line 1
Line 2
Line 3
So I need to insert a line break. I tried anything I can think of:
/r, /n, $0A (which is hexadecimal) and a regular line break as in HTML.
Nothing works.
I googled around but could not find any relevant search result covering the same problem. Although I think it can't be that difficult.
Does someone know what I should you use?
eyeD3 can include newline characters in comments. Any shell method for embedding newlines in the comment string will work. Here are three examples:
Method 1: Using actual newlines in plain quotes
Actual newlines can be embedded in plain quotes:
Method 2: Read the comment in from a multi-line file
Suppose that we have this file;
We can place that comment in the mp3 file like this:
Method 3: Using
$'...'
To add a multi-line comment to a mp3, one option is to use
$'...'
to hold the newline characters:Once this is done, we can display the multi-line comment to verify that it was properly saved:
The
$'...'
construct works well when you want to write the comment on one line of input.$'...'
also supports many other special characters beside newlines.$'...'
requiresbash
.