I'm trying to add the output of a script to a CocoaDialog textbox - problem is - it's only printing the first line....
For example - Please see below:
$ cat TEST.txt
i
am
legend
$ /Applications/CocoaDialog.app/Contents/MacOS/CocoaDialog textbox --debug --text `while read line; do echo $line; done < TEST.txt` --button1 "Close"
After running this the output is just "i"
Any ideas?
Cheers
Replace
`while read line; do echo $line; done < TEST.txt`with"`while read line; do echo $line; done < TEST.txt`", or preferably"$(<TEST.txt)".readstrips characters inIFSfrom the start and end of lines.readalso interprets backslashes without-r.echo $linestrips and collapses characters inIFS.