[SATLUG] how to cat a file with - in the name

Henry Pugsley henry.pugsley at gmail.com
Sat Jan 23 18:58:08 CST 2010


On Sat, Jan 23, 2010 at 6:56 PM, Don Davis <dondavis at reglue.org> wrote:
> There is a file with a dash '-' at the beginning of the name how can I cat
> it?
> --

cat -- -filename

The double -- terminates options and tells cat that everything after
that point is an argument.  This works for most commands .. like rm --
-filename.

-Henry


More information about the SATLUG mailing list