ryanVickers
October 16th, 2007, 06:50 PM
I'll elaborate on my title - as you can see this code below:
cd "$where"
list=$(ls -w 1)
folder=$(zenity --entry --title "Pick the File/Folder to Archive" --width 400 --text "What is the folder/file you wish to archive called?" --entry-text="$list");$where is just a place, no problems or complications there, but $list is a list of all the files/folders in $where, and I need some fine tuning...
I would like it to keep entries with a space on the same level, ex. a folder called "new folder" should show up as a single entry in the list as "new folder", but instead...
there are 2 ways - way one (with quotes) gets everything on one line and separates the names with one of those characters like a box with numbers in side (this one happens to mean "new line").
way two, without quotes or anything special lists everything in a nice list, but words with spaces, ex. a file fames new file, shows up as 2 entries "new" and "file".
Is there some way I can get the best of both worlds? Single names, even with a space on their own line, and everything in a nice list!? :confused:
Edit: to clear things up, I've added screenshots ;)
How it shoudl be is like way two, but with new place as "new place", and not as "new" "place" :(
cd "$where"
list=$(ls -w 1)
folder=$(zenity --entry --title "Pick the File/Folder to Archive" --width 400 --text "What is the folder/file you wish to archive called?" --entry-text="$list");$where is just a place, no problems or complications there, but $list is a list of all the files/folders in $where, and I need some fine tuning...
I would like it to keep entries with a space on the same level, ex. a folder called "new folder" should show up as a single entry in the list as "new folder", but instead...
there are 2 ways - way one (with quotes) gets everything on one line and separates the names with one of those characters like a box with numbers in side (this one happens to mean "new line").
way two, without quotes or anything special lists everything in a nice list, but words with spaces, ex. a file fames new file, shows up as 2 entries "new" and "file".
Is there some way I can get the best of both worlds? Single names, even with a space on their own line, and everything in a nice list!? :confused:
Edit: to clear things up, I've added screenshots ;)
How it shoudl be is like way two, but with new place as "new place", and not as "new" "place" :(