Benutzer:Heernis/Nützliche Skripte: Unterschied zwischen den Versionen

Aus EnzyklopAtys

Wechseln zu: Navigation, Suche
K
K
Zeile 5: Zeile 5:
 
# watch the log | filter only channel ryzomforge | delete first letters | remove every @{AFBF} | remove all line with <INFO> | write it into  ryomforge_live.txt
 
# watch the log | filter only channel ryzomforge | delete first letters | remove every @{AFBF} | remove all line with <INFO> | write it into  ryomforge_live.txt
  
tail -f ~/.local/share/Ryzom/0/save/log_heernis.txt | grep --line-buffered "(DYN3)" | sed -u -e 's/\(.\{40\}\)//' | sed -u -e 's/@{AFBF}//g' | sed -u -e "s/^<INFO>.*$//g"  >> ryomforge_live.txt
+
tail -f ~/.local/share/Ryzom/0/save/log_heernis.txt | grep --line-buffered "(DYN[0-9])" | sed -u -e 's/\(.\{40\}\)//' | sed -u -e 's/\@{[A-Z0-9]\+}//g' | sed -u -e "s/^<INFO>.*$//g"  >> ryomforge_live.txt
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Zeile 12: Zeile 12:
 
# read the log | filter only channel ryzomforge | delete first letters | remove every @{AFBF} | remove all line with <INFO> | write it into  ryomforge_archive.txt
 
# read the log | filter only channel ryzomforge | delete first letters | remove every @{AFBF} | remove all line with <INFO> | write it into  ryomforge_archive.txt
  
cat ~/.local/share/Ryzom/0/save/log_heernis.txt | grep "(DYN3)" | sed -e 's/\(.\{51\}\)//' | sed -e 's/@{AFBF}//g' | sed -e "s/^<INFO>.*$//g"  >> ryomforge_archive.txt
+
#!/bin/bash
 +
 
 +
grep "[123456789] ryzomforge" ~/.local/share/Ryzom/0/save/log_heernis.txt | sed -e 's/\@{[A-Z0-9]\+}//g' | sed -e 's/ \* //g' | sed -e 's/\[//g;s/\]//g;'  | sed -e 's/[1-9] ryzomforge//g' | sed -e 's/(DYN[1-9])//g' | sed '/<INFO>/d' | sed '/<USERS>/d' | sed -e 's/[0-9]\{4,\}\/[0-9]\{2,\}\/[0-9]\{2,\} [0-9]\{2,\}:[0-9]\{2,\}:[0-9]\{2,\}//g' | sed -e 's/\(.\{2\}\)//' > ryzomforge_archive.txt
  
 
</syntaxhighlight>
 
</syntaxhighlight>

Version vom 13. Juni 2019, 22:05 Uhr

#!/bin/bash

# watch the log | filter only channel ryzomforge | delete first letters | remove every @{AFBF} | remove all line with <INFO> | write it into  ryomforge_live.txt

tail -f ~/.local/share/Ryzom/0/save/log_heernis.txt | grep --line-buffered "(DYN[0-9])" | sed -u -e 's/\(.\{40\}\)//' | sed -u -e 's/\@{[A-Z0-9]\+}//g' | sed -u -e "s/^<INFO>.*$//g"  >> ryomforge_live.txt
#!/bin/bash
# read the log | filter only channel ryzomforge | delete first letters | remove every @{AFBF} | remove all line with <INFO> | write it into  ryomforge_archive.txt

#!/bin/bash

grep "[123456789] ryzomforge" ~/.local/share/Ryzom/0/save/log_heernis.txt | sed -e 's/\@{[A-Z0-9]\+}//g' | sed -e 's/ \* //g' | sed -e 's/\[//g;s/\]//g;'  | sed -e 's/[1-9] ryzomforge//g' | sed -e 's/(DYN[1-9])//g' | sed '/<INFO>/d' | sed '/<USERS>/d' | sed -e 's/[0-9]\{4,\}\/[0-9]\{2,\}\/[0-9]\{2,\} [0-9]\{2,\}:[0-9]\{2,\}:[0-9]\{2,\}//g' | sed -e 's/\(.\{2\}\)//' > ryzomforge_archive.txt
#!/bin/bash
#watch the log | filter only channel SAY/EMT | exchange charname with <Spieler> |exchange Aeps Zessen with <Ziel> | write it into  emotes.txt
tail -f /home/$USER/.local/share/Ryzom/0/save/log_heernis.txt | grep --line-buffered '(SAY/EMT)' | sed -u -e 's/\(.\{32\}\)//' | sed -u -e 's/\Heernis\b/<Spieler>/g' | sed -u -e 's/\Aeps Zessen\b/<Ziel>/g' >> emotes.txt
#!/bin/bash
# Skip System lines and cut out a part of the log based on time
grep -v "(SYSTEM" log_heernis.txt | sed -n "/2018\/06\/12 18:39/,/2018\/06\/12 18:40/p" log_heernis.txt > log_heernis_cutout.txt
#!/bin/bash
# Remove @{EE3F}
sed -e 's/\@{[A-Z0-9]\+}//g' log_heernis.txt > log_heernis