mirror of
https://github.com/cimryan/teslausb.git
synced 2026-03-01 04:30:33 +00:00
change this function to be more generic and taken in server name as an argument instead of a environment variable
This commit is contained in:
3
run/lookup-ip-address.sh
Normal file
3
run/lookup-ip-address.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
echo "$(ping -c 1 -w 1 $1 2>/dev/null | head -n 1 | grep -o -e "(\([[:digit:]]\{1,3\}\.\)\{3\}[[:digit:]]\{1,3\})" | tr -d '()')"
|
||||
Reference in New Issue
Block a user