FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Re: DOS newlines (CR/LF) to Unix format
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: DOS newlines (CR/LF) to Unix format [message #171743 is a reply to message #171734] Thu, 20 January 2011 03:26 Go to previous messageGo to previous message
Bjarne Jensen is currently offline  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...
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: fatal error: cannot redeclare
Next Topic: getting file from <option>
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 19:12:57 GMT 2024

Total time taken to generate the page: 0.03583 seconds