Issue with zenity list on ftp

Hello guys,

I am trying to create simple script which will show user GUI and redirect him to folder which he will chose based on his action, the folder is variable which has to be selected by user, the rest of the script updates/copies/removes values in that folder.

it is quite simple to create in on the "desktop"

#!/bin/bash
cd ~ 

gui=$(ls | zenity --list --column=Folder) 
if [ $? == 0 ]; then 
 cd "$gui" 
mkdir test 
else 
zenity --info --text "The script has been canceled!" 
fi 
;;

but whenever I will try the same approach on FTP in will fail, it seems that ls (or nlist) on ftp is not the same as ls ...

is there anyway how to show the user GUI on FTP ?

pseudo-code for ftp which will fail due issue that zenity command is not recognized

#!/bin/bash
ftp -inv <<+ 
lcd ~ 
open ftp. 
user USER PWD 
cd folder 
gui=$(ls | zenity --list --column=Folder) 
if [ $? == 0 ]; then 
 cd "$gui" 
else 
zenity --info --text "The script has been canceled!" 
fi 
;; 
+

alright I have solved it - created a function for the ftp ls command and piped the function into zenity :}

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.