On 06/23/2012 11:59 AM, DJ Lucas wrote: > On 06/23/2012 11:27 AM, DJ Lucas wrote: >> what is the correct syntax >> for [a-z0-9]{32}? >> >> -- DJ Lucas >> > > Never mind...had to escape the braces. Ultimately, the substitution I > was looking for was this: > > '/^[a-z0-9]\{32\} [a-z]/s@^[a-z0-9]\{32\}@\&-md5sum;@' > >
It's not fair to ask a silly question without revealing the goal. In an effort to make this thread not completely useless (and just for S&Gs), the whole process for the md5sums file looked like this...maybe it'll be useful for somebody (or not): Open the new xml file in vim and use :r "x7-app-7.7-1.md5" to read the md5sums file into the xml (in a "<screen><userinput>cat > applications.md5 << "EOF"\nEOF</userinput</screen>" block) and save file, then perform the first substitution command: sed '/^[a-z0-9]\{32\} [a-z]/s@^[a-z0-9]\{32\}@\&-md5sum;@' \ -i applications.xml Perform the second substitution command: sed '/^\&-md5sum/s@[0-9]\.[0-9]\.[0-9]\.tar@\&-version\.tar@' \ -i applications.xml And finally, fix the entities with a third substitution: for listitem in `grep "^\&-md5sum;" applications.xml | sed -e 's@\&-md5sum; @@' -e 's@\&-version;\.tar\.bz2@@'` do sed -e "/${listitem}/s@\&-md5sum@\&${listitem}md5sum@" \ -e "/${listitem}/s@\&-version@\&${listitem}version@" \ -i applications.xml done All of that to avoid the monotonous, not to mention error-prone, work of copy and paste! It'll all be reused to add the entities on the next one and package instructions for all of them to create the template for adding the descriptions and forward dependency information. -- DJ -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page