mks - SED { command fail -


on mks sed windows, this

type q:\temp\curtainssetspread.m3u | sed -e "/z/{s_a_b_}" 

fails with

sed: garbage after command 

why?

this usage accords correctly docs:

a,b{    groups commands until next matching }, sed executes entire group if { command selected address(es). 

according posix, } must preceded newline. i'm not sure mks does, beauty of having standard following should work on all systems (using multiple -es joins each string newlines in between):

sed -e "/z/{s_a_b_" -e "}" 

if doesn't work, it's bug in mks , should reported, sed posix-compliant.

i suggest following benjamin's advice , doing

sed -e '/z/s_a_b_' 

if possible, though.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -