frhyme

guess the last phonemes of a French word
git clone https://a3nm.net/git/frhyme/
Log | Files | Refs | README

commit 1d17770881b97459e48a12046e5b67a65700e388
parent 42595a7ec17cb7fcaca6899aceefa415eb39c994
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Tue, 13 Mar 2012 12:34:57 +0100

fix truncate to correctly handle tabs

Diffstat:
truncate.sh | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/truncate.sh b/truncate.sh @@ -1,5 +1,5 @@ #!/bin/bash NUM=${1:?Usage: $0 NUM_PHONEMES} -FS="\t" awk '{ printf "%s\t%s\n", $1, substr( $2, length($2) - '$NUM' + 1) }' +awk --field-separator="\t" '{ printf "%s\t%s\n", $1, substr( $2, length($2) - '$NUM' + 1) }'