|
From: <fri...@us...> - 2009-05-29 19:01:02
|
Revision: 9798
http://zaf.svn.sourceforge.net/zaf/?rev=9798&view=rev
Author: friedelwolff
Date: 2009-05-29 19:00:59 +0000 (Fri, 29 May 2009)
Log Message:
-----------
Helper to build Zulu munched .dic snippets
Added Paths:
-----------
trunk/dict/utils/flagmunch
Added: trunk/dict/utils/flagmunch
===================================================================
--- trunk/dict/utils/flagmunch (rev 0)
+++ trunk/dict/utils/flagmunch 2009-05-29 19:00:59 UTC (rev 9798)
@@ -0,0 +1,11 @@
+#!/bin/bash
+# This script creates a "munched" .dic file from a classified word list, by
+# extracting the flags from a special comment, such as # flags: ABCx
+# It reads the file given as parameter and writes to stdout
+
+INPUT=$1
+
+FLAGS=$(head -30 $INPUT|grep -E "#[ ]{0,8}flags:" | awk -Fflags: '{print $2}' | awk '{print $1}')
+
+egrep -v "^#|^$" $INPUT | sed -e "s/^\(.*\)$/\\1\/$FLAGS/"
+
Property changes on: trunk/dict/utils/flagmunch
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|