On Tuesday 17 December 2002 10.14, Philipp Thomas wrote:
* Anders Johansson (andjoh@rydsbo.net) [20021215 16:38]:
This is not the solution. You should do
cat ZendStudio-2_5_0c.bin|sed -e 's/LD_ASSUME_KERNEL=2.2.5/#LD_ASSUME_KERNEL=2.2./' > ZendStudio-2_5_0c2.bin
(the above is word wrapped. It should be all on one line when run, naturally).
Be careful with that solution as it won't work with all install packages produced by Install Anywhere because the byte count of the package changes. The universally working solution is to *replace* the first character with a hash sign:
sed -e 's/LD_ASSUME_KERNEL=2.2.5/#D_ASSUME_KERNEL=2.2./' ZendStudio-2_5_0c.bin > ZendStudio-2_5_0c2.bin
Excuse me, but my solution above doesn't change the byte count, if you look at it. Your solution does, as you forgot the final 5 in the substitute string :)
BTW, note the lack of cat as it's not needed because sed can read files on its own :)
True. I was going for the award :) Anders