addet some snippets

This commit is contained in:
pika 2024-08-19 23:06:45 +02:00
parent ad33734063
commit cf3458042f
4 changed files with 30 additions and 13 deletions

View file

@ -0,0 +1,4 @@
# ─< get the current ip as a 1 line >─────────────────────────────────────────────────────
get_ip() {
command ip a | command grep 'inet ' | command grep -v '127.0.0.1' | command awk '{print $2}' | command cut -d/ -f1 | head -n 1
}