#方法一 #!/bin/bash ifconfig eth0 | grep mask | awk '{print $2}’ #方法二 alias ip='ifconfig eth0 | grep mask | awk "{print \$2}”'