awk print everything in new line

Hi,

I have the following file and I would like to print everything to new line and the field seperator should be the dash (-).

/usr/java/jdk1.6.0_30/bin/java -Dprogram.name=run.sh -server -XX:PermSize=512m -XX:MaxPermSize=512m -XX:NewSize=1g -XX:MaxNewSize=1g -Xmx3g -Xms3g -XX:+UseLargePages -XX:ThreadStackSize=256k -verbose:gc -Xloggc:log/gclog_20130801_20-39-51 -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -XX:+DisableExplicitGC -Dsun.lang.ClassLoader.allowArraySyntax=true -Dtomcat.util.buf.StringCache.byte.enabled=true -Dtomcat.util.buf.StringCache.char.enabled=true -Dtomcat.util.buf.StringCache.trainThreshold=5 -Dtomcat.util.buf.StringCache.cacheSize=2000 -Doracle.jdbc.V8Compatible=true -XX:+HeapDumpOnOutOfMemoryError -Datg.dynamo.layers=Staging -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads=2 -XX:+UseTLAB

thanks

Please use code tags for the sample data. What should be desired output for that input data?

Found the answer.

cat temp.txt |sed 's/\ -D/\n&/g'

The output should look like this.

/usr/java/jdk1.6.0_30/bin/java
 -Dprogram.name=run.sh -server -XX:PermSize=512m -XX:MaxPermSize=512m -XX:NewSize=1g -XX:MaxNewSize=1g -Xmx3g -Xms3g -XX:+UseLargePages -XX:ThreadStackSize=256k -verbose:gc -Xloggc:log/gclog_20130801_20-39-51 -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -XX:+DisableExplicitGC
 -Dsun.lang.ClassLoader.allowArraySyntax=true
 -Dtomcat.util.buf.StringCache.byte.enabled=true
 -Dtomcat.util.buf.StringCache.char.enabled=true
 -Dtomcat.util.buf.StringCache.trainThreshold=5
 -Dtomcat.util.buf.StringCache.cacheSize=2000
 -Doracle.jdbc.V8Compatible=true -XX:+HeapDumpOnOutOfMemoryError
 -Datg.dynamo.layers=Staging -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads=2 -XX:+UseTLAB -XX:+UseBiasedLocking
 -Dsun.rmi.transport.connectionTimeout=60000
sed 's/ -/\n-/g' infile

/usr/java/jdk1.6.0_30/bin/java
-Dprogram.name=run.sh
-server
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:NewSize=1g
-XX:MaxNewSize=1g
-Xmx3g
-Xms3g
-XX:+UseLargePages
-XX:ThreadStackSize=256k
-verbose:gc
-Xloggc:log/gclog_20130801_20-39-51
-XX:+PrintGCDetails
-XX:+PrintTenuringDistribution
-XX:+PrintGCTimeStamps
-XX:+PrintHeapAtGC
-XX:+DisableExplicitGC
-Dsun.lang.ClassLoader.allowArraySyntax=true
-Dtomcat.util.buf.StringCache.byte.enabled=true
-Dtomcat.util.buf.StringCache.char.enabled=true
-Dtomcat.util.buf.StringCache.trainThreshold=5
-Dtomcat.util.buf.StringCache.cacheSize=2000
-Doracle.jdbc.V8Compatible=true
-XX:+HeapDumpOnOutOfMemoryError
-Datg.dynamo.layers=Staging
-XX:+UseConcMarkSweepGC
-XX:+UseParNewGC
-XX:ParallelGCThreads=2
-XX:+UseTLAB