|
From: | Paolo Bonzini |
Subject: | Re: sed 4.2.1 BUG Report |
Date: | Sun, 23 Oct 2011 16:36:30 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0 |
On 10/23/2011 04:17 PM, Davide Brini wrote:
> > #!/bin/sh > # input lines of the form (from bpmdj bpmcount): > #<artist> ' - '<title> '('<version> ').ogg' \n<bpm.dec> <cruft> \n > # > > > <snip> > > this doesn't work: > > #!/bin/sh > # sed script to convert dir2bpm output to .csv > # > > > cat "$1" | sed -n ' > :x > > # input lines of the form: > #<artist> ' - '<title> '('<version> ').ogg'<bpm> <cruft> N > > y/\n/ / > s/^/\"/ > s/ - /\",\"/ > s/[ ]*(/\",\"/ > s/).ogg /\",/ > s/temp.wav// > N > P > D > 'You are trying to put single quotes within single quotes, which cannot be done. :x
In other words, it is a problem in your shell syntax. I suggest creating a file like this:
#! /bin/sed -nf # input lines of the form: # <artist> ' - ' <title> '(' <version> ').ogg' <bpm> <cruft> N y/\n/ / s/^/\"/ s/ - /\",\"/ s/[ ]*(/\",\"/ s/).ogg /\",/ s/temp.wav// N P D
[Prev in Thread] | Current Thread | [Next in Thread] |