خرید بک لینک

I hope I can word my question correctly

I have a text file that looks like this when I open it in an editor.
(partial snippet)

--------- start ----

# Location of pig log file. If blank, a file with a timestamped slug
# ('pig_1399336559369.log') will be generated in the current working directory.
#
# pig.logfile=
pig.logfile=/tmp/pig-err.log

# Log4j configuration file. Set at runtime with the -4 parameter. The source
# distribution has a ./conf/log4j.properties.template file you can rename and
# customize.
#
# log4jconf=./conf/log4j.properties

---- end -----

But I need to save this file with the newline 'n' actually embedded in the file itself. I need it saved as the literal 'n'

In other words I need to save the file so it looks like this:

# Location of pig log file. If blank, a file with a timestamped slugn# ('pig_1399336559369.log') will be generated in the current working directory.n#n# pig.logfile=n# pig.logfile=/tmp/pig-err.log# Log4j configuration file. Set at runtime with the -4 parameter. The sourcen# distribution has a ./conf/log4j.properties.template file you can rename andn# customize.n#n# log4jconf=./conf/log4j.properties

Above the newlines are not interpreted as an actual newline. The text has n to designate the newline and everything above is actually contained on a single line.

I hope this makes sense. I was going to try to create a program that could read the original text file and replace the newline with the literal -> 'n' but was thinking there might be an intrinsic way of doing this .

Any tips greatly appreciated.

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 0:53

صفحه بندی