Artifact 8d7d4ebd6d4600696a3a4fe24d59101da266265aefd171d59b2fb34edf7cdd23:
- Executable file mttroot/mtt/bin/trans/mtt_p2m — part of check-in [87b97b367a] at 1998-08-12 15:53:38 on branch origin/master — More on concatenating lines - keeps going until ; or $ found. (user: gawthrop@users.sourceforge.net, size: 310) [annotate] [blame] [check-ins using]
#! /bin/sh sed 's/begin//' |\ sed 's/end//' |\ sed 's/\[\([0-9,]*\)\]/(\1)/g' |\ sed 's/:=/ = /' |\ awk '{ sub(/^[\ ]*/, "", $0) sub(/\$$/, ";", $0) if (match($NF,";")==0){ Previous[++i] = $0 } else { for (j=1;j<=i;j++) printf("%s", Previous[j]); printf("%s\n", $0) i=0; } }'