tee命令

tee /etc/apt/sources.list <<-'EOF'
xxxxx
EOF


$ echo '{"svc": {"name": "web", "tags": ["php"], "port": 80}}'  | tee /tmp/web.json