diff --git a/cotagente/horaconta/scripts/basic_office_list.sh b/cotagente/horaconta/scripts/basic_office_list.sh index ec96082..41c9dfd 100755 --- a/cotagente/horaconta/scripts/basic_office_list.sh +++ b/cotagente/horaconta/scripts/basic_office_list.sh @@ -1,15 +1,28 @@ #!/bin/sh +[ "$NAME" = "" ] && NAME="Henrique Moreira" [ "$F" = "" ] && F="tic.txt" basic_list () { - sed 's/Henrique Moreira/@~/g' | tr \\012 ' ' | tr @ \\012 | grep "PT " + sed "s/$NAME/@~/g" | \ + tr \\012 ' ' | tr @ \\012 | grep " PT " | \ + sed 's/ [P-Z][A-Z]* - Vacation Leave / vacation /' | \ + sed 's/ PT - Home Office / WFO /;s/ more_horiz //;s/ \([A-Z]\)[A-Za-z]* info[ ]*$/ \1/' | \ + sed 's/Unassigned=/UN/' | \ + grep -v " Cancelled" | stripped } +stripped () +{ + sed 's/\([0-9][0-9-]*\) to \([0-9][0-9-]*\)/\1...\2/' | \ + awk '{printf "%s, %s\n", $6, $0}' | \ + sed 's/\.00//g' +} + # # Main script