add numbers gestion function
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
0dfc8b2e7e
commit
11eef332b7
1 changed files with 13 additions and 0 deletions
13
lib/numbers.sh
Normal file
13
lib/numbers.sh
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
function generate_random_number {
|
||||
local digits="$1"
|
||||
tr -dc '0-9' </dev/urandom | head -c "$digits"
|
||||
}
|
||||
|
||||
function find_mac {
|
||||
id="${1}"
|
||||
ip="${2}"
|
||||
|
||||
cat "/etc/dnsmasq.d/${id}.conf" | grep "${ip}" | cut -d, -f 1 | cut -d= -f2
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue