Skip to content

How to add capturing group value to shed replacement #803

Discussion options

You must be logged in to vote

It's a problem with double quotes in the shell. -zsh headed me into the right direction. Running the command with single quotes instead will work correctly:

cat 02-quare-fremuerunt-gentes.krn | shed -s 5 -e 's/^(.+)$/$1yy/D'
!!!COM: Lassus, Rudolphus
!!!CDT: 1563-1625
!!!OPR: Geistliche Psalmen mit dreyen Stimmen
!!!ONM: 2
!!!OTL@@LA: Quare fremuerunt gentes
!!!OTL-incipit@@DE: Warumb empören sich die Haiden
**kern	**text	**kern	**text	**kern	**text
*staff3	*staff3	*staff2	*staff2	*staff1	*staff1
*Ivox	*	*Ivox	*	*Ivox	*
*I"Bassus	*	*I"Tenor	*	*I"Cantus	*
*I'B	*	*I'T	*	*I'C	*
*clefC3	*	*clefC2	*	*clefG2	*
*k[]	*	*k[]	*	*k[]	*
*d:dor	*	*d:dor	*	*d:dor	*
*M2/1	*	*M2/1	*	*M2/1	*
*met(C|)	*	*…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@WolfgangDrescher
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by WolfgangDrescher
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants