Obviously, the problem is caused by '\n'. On dinar's disk, the filename
probably doesn't contain a true linefeed, but a backslash followed by 'n'. To
be interpreted literally in C, a backslash must be escaped like this: "\\n".
Am Sonntag 31 Oktober 2010, 07:27:49 schrieb Динар:
> i attach tr2.txt
>
> command and output was :
>
> di...@dinar-desktop:~$ strace -o tr2 ./a.out
> /home/dinar/Документы/SED: How can I replace a newline (
> )? - Stack Overflow.html: No such file or directory
> di...@dinar-desktop:~$
>
>
> and here is in tr2.txt :
>
> lstat64("/home/dinar/\320\224\320\276\320\272\321\203\320\274\320\265
> \320\275\321\202\321\213/SED: How can I replace a newline (\n)? - Stack
> Overflow.html", 0xbf98af44) = -1 ENOENT (No such file or directory)
>