shelltricks
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
| Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige Überarbeitung | ||
| shelltricks [2020-02-10 22:33] – [Check umask for all users] su call fixed fanir | shelltricks [2021-08-02 14:19] (aktuell) – fanir | ||
|---|---|---|---|
| Zeile 2: | Zeile 2: | ||
| Miscellaneous small shell scripts that I may or may not need again in the far future. | Miscellaneous small shell scripts that I may or may not need again in the far future. | ||
| + | |||
| ===== Check umask for all users ===== | ===== Check umask for all users ===== | ||
| Zeile 14: | Zeile 15: | ||
| Original source: https:// | Original source: https:// | ||
| + | |||
| + | |||
| + | ===== Show the dates of the oldest unseen messages in multiple maildirs, newest first ===== | ||
| + | |||
| + | Beware of weird directory names. I am not responsible if this somehow does an '' | ||
| + | |||
| + | <code bash> | ||
| + | for dir in / | ||
| + | echo -e " | ||
| + | done | grep -v '/ | ||
| + | </ | ||
| + | |||
| + | Same thing, but for the newest seen messages: | ||
| + | |||
| + | <code bash> | ||
| + | for dir in / | ||
| + | echo -e " | ||
| + | done | grep -v '/ | ||
| + | </ | ||
| + | |||
| + | The only differences are the folders ('' | ||
| + | |||
| + | |||
| + | ===== Extract IP addresses from "ip a" output by regex ===== | ||
| + | |||
| + | Might be useful for scripting, I guess. | ||
| + | |||
| + | <code bash> | ||
| + | IPRE=' | ||
| + | ip a s up | grep -Eo " | ||
| + | </ | ||
| + | |||
| + | This prints: | ||
| + | |||
| + | < | ||
| + | 192.168.1.123 | ||
| + | 2001: | ||
| + | </ | ||
shelltricks.1581370386.txt.gz · Zuletzt geändert: 2020-02-10 22:33 von fanir