2016-09-26から1日間の記事一覧
Bashの書き方をすぐ忘れてしまうため記録
#!/usr/bin/env bash OUIFILE="./oui.txt" # ファイルの存在確認 if [ ! -f $OUIFILE ]; then echo "OUI file not found" exit 1 fi # テンポラリファイルの作成 tmpfile=`mktemp -t tmp.XXXXXXXXX` || exit 1 arp -a | grep ethernet > $tmpfile 2> /dev/nu…