Q:

How to print some free text in addition to SED extract

Well-known SED command to extract a first line and print to another file
sed -n '1 p' /p/raw.txt | cat >> /p/001.txt ;

gives an output in /p/001.txt like
John Doe

But how to modify this command above to add some free text and have, for example, the output like
Name: John Doe

Thanks for any hint to try.

A:

You can do that in a single command (and no sub-shells):
sed 's/^/Name: /;q' /p/raw.txt >> /p/001.txt

This prefixes "Name: " in front of the first line, prints it, then quits so you don't process additional lines.  Add a line number before the q to print all lines up to (and including) that number.  The output is appended to /p/001.txt just like your original code.
If you want a range of lines:
sed -n '3,9{s/^/Name: /;p}9q' /p/raw.txt >> /p/001.txt

This reads from lines 3-9, performs the substitution, prints, then quits after line 9.
If you want specific lines, I recommend awk:
awk 'NR==3 || NR==9 { print "Name: " $0 } NR>=9 { exit }' /p/raw.txt >> /p/001.txt

This has two clauses.  One says the number of record (line number) is either 3 or 9, in which case we print the prefix and the line.  The other tells us to stop reading the file after the 9th record.
Here are two more commands to show how awk can act on just the first line(s) or a given range:
awk '{ print "Name: " $0 } NR >= 1 { exit }' /p/raw.txt >> /p/001.txt
awk '3 <= NR { print "Name: " $0 } NR >= 9 { exit }' /p/raw.txt >> /p/001.txt

It appears you're continuously building one file from the other. Consider:
tail -Fn0 /p/raw.txt |sed 's/^/Name: /' >> /p/001.txt

This will run continuously, adding only new entries (added after the command is run) to /p/001.txt
Perhaps you have lots of duplicates to resolve?
awk 'NR != FNR { $0 = "Name: " $0 } !s[$0]++' \
  /p/001.txt /p/raw.txt > /tmp/001.txt && mv /tmp/001.txt /p/001.txt

This folds together the previously saved names with any new names, printing names only once (!s[$0]++ is true when s[$0] is zero (its default state), but after the evaluation, it increments to one, making it false on the second occurrence.  When a bare clause has no action, the line is printed.)  Because we're reading the output file, we need a temporary output. Upon its successful completion, we then move it atop the target output file.

