lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Editing tool


From: David Raleigh Arnold
Subject: Editing tool
Date: Thu, 2 Sep 2010 15:24:21 -0400
User-agent: KMail/1.13.3 (Linux/2.6.32-4-686-bigmem; KDE/4.4.4; i686; ; )

Run this command:
$ rowil 112351324511235167859
On this line, selected:
c4 d4 e4 g,4 | Now is the time
And this will be produced:
c4 c4 d4 e4 | c4 e4 d4 g,4 | c4 c4 d4 e4 | c4 Now is the | time 

Anything separated by a space is a word. The limit is nine
words on the selected line, but the expansion can be very
large.

The argument to rowil is a list of numbers indicating how words
in the selected lines are to be reordered. Typical use would be
for any pattern repeated for many lines. You list the
notes and then reorder them with rowil. If I had left off 67859,
"Now is the | time" would not have been printed.

---------------------------------------------- 

#!/bin/bash
# rowil: re-order-words-in-line
str=$1
# put spaces and $ on/between numbers
strn=$(echo $str | sed 's/[1-9]/$&" "/g')
# feed each line to awk for printing rearranged columns
awk "{print $strn}" 

-------------------------------------------------

Regards, daveA

-- 
For beginners: very easy guitar music, solos, duets, exercises. Early
intermediate guitar solos. One best scale set for all guitarists.
http://www.openguitar.com/scalescomparison.html ::: plus new and
better chord and arpeggio exercises.  http://www.openguitar.com 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]