I'm having writing to files when using a variable for the line number in the /write command. For example:

write $writey

/writey return -dl $+ %rline

I have also tried using /write -dl $+ %rline on its own, but switched to the way above and it still doesn't work.

For some reason, the first example will work fine if I just type it in at the prompt, but if I try to run it through any kind of an alias, it doesn't work.

Any ideas?