2014-07-02 21:06 GMT+04:00  <ma...@apache.org>:
> Author: markt
> Date: Wed Jul  2 17:06:31 2014
> New Revision: 1607422
>
> URL: http://svn.apache.org/r1607422
> Log:
> Tweak sed command so it does the same thing but works on OSX
>
> Modified:
>     tomcat/native/branches/1.1.x/jnirelease.sh
>
> Modified: tomcat/native/branches/1.1.x/jnirelease.sh
> URL: 
> http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/jnirelease.sh?rev=1607422&r1=1607421&r2=1607422&view=diff
> ==============================================================================
> --- tomcat/native/branches/1.1.x/jnirelease.sh (original)
> +++ tomcat/native/branches/1.1.x/jnirelease.sh Wed Jul  2 17:06:31 2014
> @@ -192,7 +192,7 @@ fi
>  # Remove first 25 lines from converted file which contains
>  # page navagation data.
>  # Remember to increase the lines when new file is added to news.
> -sed -i '1,25d' ../../CHANGELOG.txt
> +sed -i '' '1,25d' ../../CHANGELOG.txt


The -i option (edit in-place) is not specified in POSIX [1]. The
workaround without this option is to pipe output into a new temporary
file and replace the original one.

Here is an example:
http://stackoverflow.com/questions/18527365/what-does-sed-i-option-do

I do not expect much portability from jnirelease.sh script that is
being run by RM only, but if we start encountering portability issues
it may be worth considering.


[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to