#!/bin/bash
FILE=$1
while read line; do
echo "MAC : $line"
PID=$(ps aux | grep "$line" | grep -v "grep" | awk {'print $2'})
echo "PID : $PID"
done < $FILE
#!/bin/bash
FILE=$1
while read line; do
echo "MAC : $line"
MAC=$(echo "$line" | cut -c 1-17)
PID=$(ps aux | grep $MAC | grep -v "grep" | awk {'print $2'})
echo "PID : $PID"
done < $FILE
./script /путь/до/файла/файл