The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 01-02-2009
Panos1962 Panos1962 is offline
Registered User
  
 

Join Date: Dec 2008
Location: Thessaloniki, GREECE
Posts: 29
Try -- to sign end of options. This is a general rule for such problems, e.g.
To grep -3 try:

grep -- -3 ...

If yoy want to remove a file named -panos you give:

rm -- -panos

etc.

This fact is true due to getopt function. This function is used by system programers
who write tools like grep, rm etc. The function marks end of option with a double dash
(--), so the behavior is similar for all tools using getopt to process options.