Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P7358
host2network_constants.awk
Active
Public
Actions
Authored by
•
ema
on Jul 11 2018, 1:56 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F23614986: host2network_constants.awk
Jul 11 2018, 1:56 PM
2018-07-11 13:56:23 (UTC+0)
Subscribers
None
#!/usr/bin/awk -f
# convert /usr/bin/host output to the format used by
# modules/network/manifests/constants.pp
# Usage: host cp1008.wikimedia.org | ./host2network_constants.awk
{
ip
=
" '"
$
NF
"',"
h
=
"# "
$
1
printf
(
"%-57s %s\n"
,
ip
,
h
);
}
Event Timeline
•
ema
created this paste.
Jul 11 2018, 1:56 PM
2018-07-11 13:56:23 (UTC+0)
Log In to Comment