X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Fview_attendee.sh;h=5966729e01611df62bb78485d186cf8ecefd1b0d;hp=1394cedacae447feae5e644e5b97c493a53da9af;hb=70c5786a6b3dd9c6561e2f19f2827ce92191c13f;hpb=d6ca659b75648cf1001d731484e643aa35888dd7 diff --git a/templates/view_attendee.sh b/templates/view_attendee.sh index 1394ced..5966729 100755 --- a/templates/view_attendee.sh +++ b/templates/view_attendee.sh @@ -15,9 +15,8 @@ # You should have received a copy of the GNU Affero General Public License # along with Confetti. If not, see . -n=$(printf %s "$values[N]" \ - | sed -rn 's:^([^;]*)(\;[^;]*)(\;[^;]*)?(\;[^;]*)?(\;[^;]*)?$:\4 \2 \3 \1 \5:gp' \ - | sed -r 's:,: :;s:\;: :g;s: +: :g;s:^ $::;' +n=$(printf %s "$values[N+3] $values[N+1] $values[N+2] $values[N+0] $values[N+4]" \ + | sed -r ':X;$!{N;bX}; s;^[\n ]+;;; s;[\n ]+$;;; s;[\r\t\n ]+; ;g;' ) fullname="${n:-${values[FN]:-${values[NICKNAME]}}}"