Benutzer:Heernis/Nützliche Skripte: Unterschied zwischen den Versionen
Aus EnzyklopAtys
K |
K |
||
Zeile 2: | Zeile 2: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
#!/bin/bash | #!/bin/bash | ||
− | + | tail -f ~/.local/share/Ryzom/0/save/log_heernis.txt | grep --line-buffered "[123456789] ryzomforge" | sed -u -e 's/\@{[A-Z0-9]\+}//g' | sed -u -e 's/ \* //g' | sed -u -e 's/\[//g;s/\]//g;' | sed -u -e 's/[1-9] ryzomforge//g' | sed -u -e 's/(DYN[1-9])//g' | sed -u '/<INFO>/d' | sed -u '/<USERS>/d' | sed -u -e 's/[0-9]\{4,\}\/[0-9]\{2,\}\/[0-9]\{2,\} [0-9]\{2,\}:[0-9]\{2,\}:[0-9]\{2,\}//g' | sed -u -e 's/\(.\{2\}\)//' >> ryomforge_live.txt | |
− | |||
− | |||
− | tail -f ~/.local/share/Ryzom/0/save/log_heernis.txt | grep --line-buffered " | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
#!/bin/bash | #!/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 | 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> | ||
+ | Example: | ||
+ | 2019/06/10 23:00:08 (DYN3) * @{EE3F}[3 ryzomforge] Nilstilar sagt: @{AFBF}Bonne nuit / Good night | ||
+ | '''Rewrites to''' | ||
+ | Nilstilar sagt: Bonne nuit / Good night | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> |
Version vom 13. Juni 2019, 22:14 Uhr
#!/bin/bash
tail -f ~/.local/share/Ryzom/0/save/log_heernis.txt | grep --line-buffered "[123456789] ryzomforge" | sed -u -e 's/\@{[A-Z0-9]\+}//g' | sed -u -e 's/ \* //g' | sed -u -e 's/\[//g;s/\]//g;' | sed -u -e 's/[1-9] ryzomforge//g' | sed -u -e 's/(DYN[1-9])//g' | sed -u '/<INFO>/d' | sed -u '/<USERS>/d' | sed -u -e 's/[0-9]\{4,\}\/[0-9]\{2,\}\/[0-9]\{2,\} [0-9]\{2,\}:[0-9]\{2,\}:[0-9]\{2,\}//g' | sed -u -e 's/\(.\{2\}\)//' >> ryomforge_live.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
Example: 2019/06/10 23:00:08 (DYN3) * @{EE3F}[3 ryzomforge] Nilstilar sagt: @{AFBF}Bonne nuit / Good night Rewrites to Nilstilar sagt: Bonne nuit / Good night
#!/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