awk 删除空白行

cat /etc/default/docker
# Here in Debian, this file is sourced by:
#   - /etc/init.d/docker (sysvinit)
#   - /etc/init/docker (upstart)
#   - systemd's docker.service

# Use of this file for configuring your Docker daemon is discouraged.

# The recommended alternative is "/etc/docker/daemon.json", as described in:
#   https://docs.docker.com/v1.11/engine/reference/commandline/daemon/#daemon-configuration-file
DOCKER_OPTS=" --bip=172.17.2.1/24 --ip-masq=false --mtu=1450"
# If that does not suit your needs, try a systemd drop-in file, as described in:
#   https://docs.docker.com/v1.11/engine/admin/systemd/#custom-docker-daemon-options

awk '!/#/{if($0!="")print}' /etc/default/docker
DOCKER_OPTS=" --bip=172.17.2.1/24 --ip-masq=false --mtu=1450"

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27181165/viewspace-2145496/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/27181165/viewspace-2145496/

你可能感兴趣的:(awk,运维,json)