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 34 days ago. Viewed 1,004 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
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 5 Guests.
Recently Changed
netplan set
nmap
Device Table Size Maximum
FortiClient Error Codes
Add New Disks To Grow Volume
VLAN IP Interface
Logging Volume Per-Adom
SSH No Key Exchange method found
Example nmcli Commands
etckeeper
What Program Has This Port Open
2022
Batmobile
Srv_features
2018
2014
Ferrari 333 SP
HotWheels
Custom '77 Dodge Van
Super Van
Fandango
Corvette C6R
Bone Shaker
Fire Eater
2021
2020
2019
2016
2013
2012
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