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
, 2 years and 20 days ago. Viewed 643 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-index
ntp footprint
snipsnap-search
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...
...
Cypher Set...
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 a Guest.
Recently Changed
Useful tshark Examples
DHCP Reservations
PHP 7
Find Transparent Proxy Systems
Active Directory with SSSD
Could Not Format Alternate Root
Use User's Password As Enable Password
VPN Status
Startup Control
nbtstat for Linux
Additional Disk
SSH pubkey authentication
CLI Restore Configuration
Example nmcli Commands
tls
macwatch
mac address
BGP Sessions
BGP Neighbors
Unifi Controller
Show Known Wifi Passwords
docker
Remove Host ID
snmpd crash in "Check_HR_FileSys_AutoFs
execute command on hosts
facts
Grow A LVM Partition
FortiClient Error Codes
Test Authentication Server
2020
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