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
, 5 years and 33 days ago. Viewed 1,293 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-index
snipsnap-search
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 7 Guests.
Recently Changed
Device-Local Certificate Expired
CLI Policy Lookup
DH Selection For IPsec VPNs
Scan For Newly Added Disk
nmap
Seconds Since Epoch to Local Time
Link Monitor
DH group to OAKLEY_GROUP table
Fire Eater
start
FortiClient Error Codes
dhparams Generation
SSL Certificate Bundles
ufw
Grow A LVM Partition
Creating Users
whoami
list databases
2023
2022
2019
2018
2017
2011
2010
2008
2001
2000
1999
1991
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