title: zenity input file with several lines
body: <p>I have a problem with zenity I cannot work out. Could you guys help me?</p>
  
  <p>I have a 7 line long tmp3 file:</p>
  
  <pre><code>AAA
  BBB
  ...
  FFF
  GGG
  </code></pre>
  
  <p>I want to send this file through zenity so that it displays a checklist with the possibilty to check every line I want with every combination I want.</p>
  
  <p>I previously wrote:</p>
  
  <pre><code>cat tmp3 | zenity --list \
                    --column='#' \
                    --text "Select playlist from the list below" \
                    --title "Please select one or more playlists" \
                    --multiple \
                    --width=300 \
                    --height=300 \
                    --checklist \
                    --column "Select" \
                    --separator="/ ")
  </code></pre>
  
  <p>All this does is create one single line in zenity with all 7 files of tmp3. Thats not what I want.</p>
  
  <p>I currently wrote this:</p>
  
  <pre><code>choice=$(zenity --list \
                  --column "Playlists" FALSE $(cat tmp3) \
                  --text "Select playlist from the list below" \
                  --title "Please select one or more playlists" \
                  --multiple \
                  --width=300 \
                  --height=300 \
                  --checklist \
                  --column "Select" \
                  --separator="/ ")
  </code></pre>
  
  <p>Here something really weird happens that I dont understand. 4 out of 7 fields are created in zenity: AAA CCC EEE and GGG. But not the other ones. When I set -x for debugging I can see all 7 lines being piped to zenity... What is happening?????</p>
  
  <p>I tried another solution by listing the 7 subfolders in my current folder (which happen to have the exact same name as the lines in tmp3). The same thing happens!:</p>
  
  <p>I wrote this:</p>
  
  <pre><code>choice=$(zenity --list \
                  --column "Playlists" FALSE $(ls -d -1 */) \
                  --text "Select playlist from the list below" \
                  --title "Please select one or more playlists" \
                  --multiple \
                  --width=300 \
                  --height=300 \
                  --checklist \
                  --column "Select" \
                  --separator="/ ")
  </code></pre>
  
  <p>The second solution seems easier but my skills aren't very high. And I would like to understand the latter solution and why it does this.</p>
  
  <p>Thank you guys!</p>
  
  <p>EDIT:
  I have found this and tried to make it work my way but no success so far... 
  <a href="http://www.linuxquestions.org/questions/programming-9/reading-lines-to-an-array-and-generate-dynamic-zenity-list-881421/" rel="nofollow">http://www.linuxquestions.org/questions/programming-9/reading-lines-to-an-array-and-generate-dynamic-zenity-list-881421/</a></p>