sed is utility to replace particular text with new text in files.
s/// doesn’t work with \n
use y/// for \n replacement
sed 'y/ /\n/g'
Or you can use ‘tr’
$> tr -s '~' '\n' < inputfile > outputfile
sed is utility to replace particular text with new text in files.
s/// doesn’t work with \n
use y/// for \n replacement
sed 'y/ /\n/g'
Or you can use ‘tr’
$> tr -s '~' '\n' < inputfile > outputfile