The 'tr' command translates characters. Using 'cat test1 | tr ' ' '|' > test2' reads the file, translates all spaces to pipe characters, and redirects output to test2. Option B uses 'cut' incorrectly for this purpose, option C translates pipes to spaces (reverse of what's asked), and option D doesn't perform any transformation.