The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to override my profile mobile01 High Level Programming 0 11-30-2006 08:35 AM
override the function in C naren_chella High Level Programming 1 10-31-2006 06:38 AM
date override gerry shacter AIX 1 01-08-2006 10:42 PM
script to override natting ppass Shell Programming and Scripting 9 03-22-2005 02:23 PM
Override Mulo IP Networking 1 03-10-2002 06:56 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 01-23-2002
Registered User
 

Join Date: Dec 2001
Location: UK, England
Posts: 45
Override protection.....

I am having this problem......when I run this script:

print -n "Enter file name to be deleted: "
read answer
if [ -f $name ]
then
rm $name
else
echo "No such file with the name: $name exists"
fi

I was trying to test my script for errors, and basically when the user had files with the rights: 400, 100, and 500, this message came up "rm: filename: override protection 500, then gives a yes/no option. Y does this message come up?? If yes is chosen the file is deleted but, I was wounderin when writing a script does the validation have to include a message that the user inputs into the script to deal with it?? I would like to enter a message that would deal with it, can ne1 help me input this message?? I dont know how to go about it...
Forum Sponsor
  #2  
Old 01-23-2002
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
You can use the "-f" flag to rm to automatically override this message.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:00 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0