awk/sed output from system_profiler on 10.6.8 If I have:

foo
bar

..and I'd like to awk/sed this to:

foo-bar

..what's the syntax?

I'm trying to use:

system_profiler SPMemoryDataType | awk '/Type/ {print $2} /Speed/ {print $2}'|sed 's/\r$/a\"-"/'


to output type-speed (ie DDR-1067).
Use this sed instead:

|sed '$!N;s/\n/ /' 


system_profiler SPMemoryDataType | awk '/Type/ {print $2} /Speed/ {print $2}'|sed '$!N;s/\n/ /'

output:

DDR3 1066
DDR3 1066
DDR3 1066
Empty Empty