ls kill@*|while read line; do 
  cp ${line} /home/dtorgo/.minecraft/config/triumph/script/triumph/hidden/
  sed '/alwaysVisible/d' /home/dtorgo/.minecraft/config/triumph/script/triumph/hidden/${line} -i
sed '/setAnnounce/d' /home/dtorgo/.minecraft/config/triumph/script/triumph/hidden/${line} -i
sed '/setShowToast/d' /home/dtorgo/.minecraft/config/triumph/script/triumph/hidden/${line} -i
sed '/alwaysHidden/d' /home/dtorgo/.minecraft/config/triumph/script/triumph/hidden/${line} -i
  advname=$(echo "${line}"|sed 's/.txt//')
  echo "alwaysHidden()
setAnnounceToChat(false)
setShowToast(false)
setRepeatTime(10)
addRewardFunction(\"triumph:${advname}\")" >> /home/dtorgo/.minecraft/config/triumph/script/triumph/hidden/${line}
../organize /home/dtorgo/.minecraft/config/triumph/script/triumph/hidden/${line}
echo "advancement grant @p only triumph:0_progression/${advname}" > /home/dtorgo/.minecraft/config/triumph/functions/triumph/${line}
sed '/criteria/d' "${line}" -i
echo 'addCriteria("impossible", "minecraft:impossible")' >> "${line}"
../organize "${line}"
done
