Re: DOS newlines (CR/LF) to Unix format [message #171743 is a reply to message #171734] |
Thu, 20 January 2011 03:26 |
Bjarne Jensen
Messages: 9 Registered: January 2011
Karma:
|
Junior Member |
|
|
On 2011-01-19 12:33, Thomas 'PointedEars' Lahn wrote:
<zipped>
> Assuming that you are allowed to exec(): You should have copy-pasted; the
> shell command is not the same. In essence, it is an awk(1) invocation
> error: Unquoted `{' and `}' are for Brace Expansion in a POSIX-compatible
> shell.
I can do like exec("whoami") fine so I assume that I should be permitted
to awk, dos2unix etc. ?
> But you do not need a shell or awk(1) to accomplish what you want (although
> dos2unix(1)/fromdos(1) is arguably faster than awk(1)), PHP has e.g.
> fread(), preg_replace(), and fwrite().
Speed is no issue but preg_replace() is beginning to look beautiful...
|
|
|