Using awk with filename containing "=" and ":"

Hello everyone,

I need to modify a number of files, and it appears that I cannot apply awk to a filename that contains a equal sign. I guess the filename is interpreted as an assignment. Say I want to awk the file "$PWD/not=working"

awk '{print}' not=working

the shell hangs, waiting for its input.

The files are gained from another person, they cannot be generated with a different name. It would be nice to be able to use awk without changing filenames and changing back (something I also probably couldn't do quickly.)

I'm new to awk, is there a way to get this to work using escape sequences or quotes or something?
Thanks

Try to escape both the equal sign and the colon

 awk -v equal=dot.end 'BEGIN{print equal}' file\=\:new

Sorry, perhaps it wasn't well explained, I have modified the original question, I don't want any definitions, the file I want to apply awk to has the name "not=working".

Putting a slash in front of the equals sign does not work.

See The AWK Manual - Other Arguments

I followed that link, and understand that the awk is reading the filename as a variable declaration.

But I was wondering if there is some way to trick awk into using an expression such as not=working as a filename, as my files have equal signs in the names. I couldn't see that information in the link.

A simple escape character not\=working does not work.

This is the first paragraph of the link...

Why not copy the files like 'not=working' to 'not_working' and then use that copy in awk?

awk '{print}' < not=working

Ahhh, thank you. Thats what I was looking for,

awk '{print}' < not=working

Did work!

Cheers