Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Search Forums:



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-23-2009
Registered User
 

Join Date: Jan 2009
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
zenity --question help

Hello

I've a script where I've a zenity --question because I want to ask the user if he is sure that he wants to delete the file.
The problem is, if the user says "OK" it deletes nad if the user says cancel it deletes
How can I close the script if the user says cancel??

thanks
Sponsored Links
    #2  
Old 03-23-2009
amitranjansahu's Avatar
Registered User
 

Join Date: Jan 2009
Location: Bangalore,INDIA
Posts: 503
Thanks: 4
Thanked 26 Times in 26 Posts
why don't u use -i option

rm -i file
Sponsored Links
    #3  
Old 03-23-2009
Registered User
 

Join Date: Jan 2009
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by amitranjansahu View Post
why don't u use -i option

rm -i file
Because it's not a regular file. It's a file from a working copy that I use with subversion
    #4  
Old 03-25-2009
Yogesh Sawant's Avatar
Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,211
Thanks: 6
Thanked 17 Times in 16 Posts
have you tried something like:
Code:
zenity --question --title "Alert"  --window-icon=none  --text "Are you sure you want to delete this file?"; echo =$?=

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Zenity ruben.rodrigues Shell Programming and Scripting 2 03-03-2009 07:33 AM
Using 'stat' to determine file system type (with Zenity) mdpalow Shell Programming and Scripting 0 12-20-2007 12:49 AM



All times are GMT -4. The time now is 03:13 AM.