Virtual Dave
For When You Can't Have The Real Thing
[
start
|
index
|
login
]
start
>
Linux
> sed > Strip Comments And Whitespace From Config Files
Strip Comments And Whitespace From Config Files
Created by
dave
. Last edited by
dave
, 3 years and 140 days ago. Viewed 861 times. #2
[
diff
] [
history
]
[edit]
[
rdf
]
labels
attachments
(2019-02-15)
Problem
Wordy config files that are all comments and whitespace. We want to see the actual configuration.
Solution
# sed -e 's/#.*$//g' -e '/^s*$/d' < FILE
(Source: a Stack Overflow post I can't find right now.)
no comments |
post comment
see also:
snipsnap-notfound
snipsnap-search
snipsnap-index
Linux
ntp footprint
LAG and...
log in to post comments
start
Remote ...
gpw
tftp-server
Switching Tables
Assign Unowned ...
Force NFS...
Common Hou...
Enable SSL
Connecting...
lft
T...
...
Virtual Dave
Megaplex:
Home Page
This wiki's
start
page
Send Feedback To Dave
(read this
note about local search
)
Logged in Users: (0)
… and 6 Guests.
Recently Changed
Format Install via TFTP
SD-WAN Diagnostics
Port Vlan Mirror Analyzer
tls
systemd
Bluetooth Mouse Stops Working
pcap to netflow
Useful nfdump examples
Samba Winbind
key type ssh-rsa not in PubkeyAcceptedAlgorithms
Linux
Show POE Utilization
Read-Only Admin Profile
Grow Linux Filesystem
LDAP lookup account considerations
Fedora Upgrade Procedure
Installing From The Vault
Associating From Addresses To Inbound IP Addresses
Test SMTP-AUTH using Telnet
SSH Key Exchange Login Fails
IPSA self test failed, disable IPSA!
Missing HTTPOnly Cookie Attribute
Disable TCP Timestamps
2021
2020
2019
2018
2017
2016
2015
Editing:
snipsnap-help
,
Image Macro
(
Et auditum est, et idcirco ego nunc simulare
)
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.
Useful:
snipsnap-help
snipsnap-macro-help
Google
snipsnap.org
| Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt