Replace literal \n with newline

Mike Garfias mike at garfias.org
Tue May 27 12:24:00 MST 2008


this works for me:

cat file | sed -e 's/\\n/\n/g'

On May 27, 2008, at 12:14 PM, David Bendit wrote:

> Hey there,
>
> I'm trying to pull useful information out of a nessus report file  
> (which is just XML), and everything works fine except the  
> informational data portions. They're stored with string literal \n,  
> and I can't figure out an easy way to convert those to actual  
> newlines. With tr, the best I can get is removing all the n's, and I  
> think it may be because bash is confused at the order of escaping,  
> if that makes any sense. Any help is appreciated.
>
> -David Bendit
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss



More information about the PLUG-discuss mailing list