You are not logged in.
Hello,
I'm running a utility that works over a serial connection and then dumps data to the screen:
...
00000000: 02 FE 01 6D 00 00 00 00 09 FE 02 17 00 40 3D 80
00000010: 00 00 20 00 DA 00 00 00 00 00 00 00 00 00 00 00
00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000000A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000000B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000000C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000000D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...
However, when I do the following...
RESULTS=`/usr/bin/java -Dcfg=config.txt -Dconsole -jar ~/code/copy_utility.jar`
echo $RESULTS >| $CURRENT_DIRECTORY/temp.txt
And then check out temp.txt, all of that information is in one giant long line. How can I include newline characters in there?
Last edited by publicus (2014-04-30 18:13:04)
Offline
Try echo "$RESULTS"
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
quote $RESULTS in the second line
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Hello. Thanks to both of you. The quotes did the trick.
Offline