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
, 4 years and 231 days ago. Viewed 1,134 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:
Linux
snipsnap-notfound
snipsnap-search
snipsnap-index
ntp footprint
LAG and...
log in to post comments
Enable+SSL
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 2 Guests.
Recently Changed
Fire Eater
start
FortiClient Error Codes
Scan For Newly Added Disk
dhparams Generation
SSL Certificate Bundles
Seconds Since Epoch to Local Time
ufw
Grow A LVM Partition
Creating Users
whoami
list databases
DH Selection For IPsec VPNs
2023
2022
2019
2018
2017
2011
2010
2008
2001
2000
1999
1991
Custom '77 Dodge Van
Bone Shaker
Batmobile
Fire Eater Wanted
dvr-scan
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