请问可否写一个脚本运行后可以把MAC地址存入某个新建的文件?(已解决)
-
- 帖子: 49
- 注册时间: 2009-07-08 14:22
请问可否写一个脚本运行后可以把MAC地址存入某个新建的文件?(已解决)
我对脚本知识一无所知,但因工作需要,急需找一个方法,可以把机器上的MAC地址存入新建的文件中(手动存进去我会),请问可以用脚本实现吗?具体思路是什么?请大侠们帮帮忙
上次由 sdu_wizard 在 2009-09-02 9:53,总共编辑 1 次。
- xiooli
- 帖子: 6956
- 注册时间: 2007-11-19 21:51
- 来自: 成都
- 联系:
Re: 请问可否写一个脚本运行后可以把MAC地址存入某个新建的文件?
代码: 全选
ifconfig | grep -o "HWaddr .*" | sed "s/HWaddr //" > file
-
- 帖子: 49
- 注册时间: 2009-07-08 14:22
- xiooli
- 帖子: 6956
- 注册时间: 2007-11-19 21:51
- 来自: 成都
- 联系:
Re: 请问可否写一个脚本运行后可以把MAC地址存入某个新建的文件?
代码: 全选
ifconfig | grep -o "硬件地址 .*" | sed "s/硬件地址 //" > file
- eexpress
- 帖子: 58428
- 注册时间: 2005-08-14 21:55
- 来自: 长沙
- O_O_BOT
- 帖子: 2461
- 注册时间: 2009-05-20 19:32
Re: 请问可否写一个脚本运行后可以把MAC地址存入某个新建的文件?

可以模拟出10个网卡每个一个mac
蛛网 程序指定 网络端口
想怎么用就怎么用
irc 聊天室
ubuntu-cn 的irc 频道为
irc.ubuntu.com 8001 #ubuntu-cn
UTF8编码 可用 irssi xchat pidgin weechat 登录
http://webchat.freenode.net/?channels=ubuntu-cn
[url]irc://irc.freenode.net/ubuntu-cn[/url]
ubuntu-cn 的irc 频道为
irc.ubuntu.com 8001 #ubuntu-cn
UTF8编码 可用 irssi xchat pidgin weechat 登录
http://webchat.freenode.net/?channels=ubuntu-cn
[url]irc://irc.freenode.net/ubuntu-cn[/url]
-
- 帖子: 49
- 注册时间: 2009-07-08 14:22
Re: 请问可否写一个脚本运行后可以把MAC地址存入某个新建的文件?
楼上的兄台是什么意思啊?不理解O_O_BOT 写了:![]()
可以模拟出10个网卡每个一个mac
蛛网 程序指定 网络端口
想怎么用就怎么用
-
- 帖子: 49
- 注册时间: 2009-07-08 14:22
Re: 请问可否写一个脚本运行后可以把MAC地址存入某个新建的文件?
我没想盗别人MAC啊eexpress 写了:xiooli, 想死啊。这明显是准备盗窃别人的mac用的。
- 543082593
- 帖子: 234
- 注册时间: 2008-11-07 8:41
Re: 请问可否写一个脚本运行后可以把MAC地址存入某个新建的文件?
sudo ifconfig | grep 'HWaddr'| awk '{print $5}'
fall again
smooth criminal
they don't care about us
billie jean
beat it
dangerous
the lost children
childhood
ben
i will be there
speechless
she is out of my life
rock with you
...
LOVE U FOREVER
smooth criminal
they don't care about us
billie jean
beat it
dangerous
the lost children
childhood
ben
i will be there
speechless
she is out of my life
rock with you
...
LOVE U FOREVER
-
- 帖子: 49
- 注册时间: 2009-07-08 14:22
Re: 请问可否写一个脚本运行后可以把MAC地址存入某个新建的文件?
谢谢楼上的兄台543082593 写了:sudo ifconfig | grep 'HWaddr'| awk '{print $5}'