BASH Tools for conf file manipulation?Bash - Continuous String ManipulationHow to notice log file changes...
Why is this Simple Puzzle impossible to solve?
What is the most important source of natural gas? coal, oil or other?
Can a wire having a 610-670 THz (frequency of blue light) AC frequency supply, generate blue light?
How many chess players are over 2500 Elo?
At what point in European history could a government build a printing press given a basic description?
How strong are Wi-Fi signals?
Why does the 6502 have the BIT instruction?
Geological aftereffects of an asteroid impact on a large mountain range?
How do I subvert the tropes of a train heist?
General purpose replacement for enum with FlagsAttribute
PETG layer adhesion
Rests in pickup measure (anacrusis)
How do I align equations in three columns, justified right, center and left?
Is this story about US tax office reasonable?
Where is the logic in castrating fighters?
How did early x86 BIOS programmers manage to program full blown TUIs given very few bytes of ROM/EPROM?
Command to Search for Filenames Exceeding 143 Characters?
Full horizontal justification in table
Is this resistor leaking? If so, is it a concern?
Why doesn't the Earth's acceleration towards the Moon accumulate to push the Earth off its orbit?
Tic-Tac-Toe for the terminal
When did God say "let all the angels of God worship him" as stated in Hebrews 1:6?
Why do airplanes use an axial flow jet engine instead of a more compact centrifugal jet engine?
When and what was the first 3D acceleration device ever released?
BASH Tools for conf file manipulation?
Bash - Continuous String ManipulationHow to notice log file changes with Linux standard tools?String manipulation in shellBash script with conf file with unknown number of sets of variablesData ManipulationUsing multiple sed commands for text manipulationFile manipulation - understanding script outputBash script aborting for loopTaking a file argument for a Bash scriptBash String manipulation when string contains parentheses
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I am wondering if there are any tools for use in bash scripts that can easily allow you to manipulate (add, remove, update) directives inside conf files?
e.g.
fail2ban.conf has grouped directives, each under their own sections.
[proftpd]
enabled = true
port = ftp,ftp-data,ftps,ftps-data
[postfix]
enabled = true
port = smtp,465,submission
whereas pagespeed.conf has mixed directives, some in their own sections and some arrayed all over.
<Location /pagespeed_admin>
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
SetHandler pagespeed_admin
</Location>
<Location /pagespeed_global_admin>
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
SetHandler pagespeed_global_admin
</Location>
ModPagespeedMessageBufferSize 100000
ModPagespeedStatisticsLogging on
ModPagespeedEnableCachePurge on
ModPagespeedPurgeMethod PURGE
ModPagespeedFileCacheSizeKb 2048000
ModPagespeedFileCacheCleanIntervalMs 3600000
ModPagespeedFileCacheInodeLimit 500000
You get the idea.
Are there any tools that allow you to :
e.g.
manipulate the 'enabled' directive in the 'proftpd' section of fail2ban.conf?
or
manipulate the 'Allow from' directive in the 'Location /pagespeed_admin' section of pagespeed.conf?
or
manipulate the 'ModPagespeedMessageBufferSize' directive in the 'no particular' section of pagespeed.conf?
shell-script scripting
New contributor
add a comment |
I am wondering if there are any tools for use in bash scripts that can easily allow you to manipulate (add, remove, update) directives inside conf files?
e.g.
fail2ban.conf has grouped directives, each under their own sections.
[proftpd]
enabled = true
port = ftp,ftp-data,ftps,ftps-data
[postfix]
enabled = true
port = smtp,465,submission
whereas pagespeed.conf has mixed directives, some in their own sections and some arrayed all over.
<Location /pagespeed_admin>
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
SetHandler pagespeed_admin
</Location>
<Location /pagespeed_global_admin>
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
SetHandler pagespeed_global_admin
</Location>
ModPagespeedMessageBufferSize 100000
ModPagespeedStatisticsLogging on
ModPagespeedEnableCachePurge on
ModPagespeedPurgeMethod PURGE
ModPagespeedFileCacheSizeKb 2048000
ModPagespeedFileCacheCleanIntervalMs 3600000
ModPagespeedFileCacheInodeLimit 500000
You get the idea.
Are there any tools that allow you to :
e.g.
manipulate the 'enabled' directive in the 'proftpd' section of fail2ban.conf?
or
manipulate the 'Allow from' directive in the 'Location /pagespeed_admin' section of pagespeed.conf?
or
manipulate the 'ModPagespeedMessageBufferSize' directive in the 'no particular' section of pagespeed.conf?
shell-script scripting
New contributor
add a comment |
I am wondering if there are any tools for use in bash scripts that can easily allow you to manipulate (add, remove, update) directives inside conf files?
e.g.
fail2ban.conf has grouped directives, each under their own sections.
[proftpd]
enabled = true
port = ftp,ftp-data,ftps,ftps-data
[postfix]
enabled = true
port = smtp,465,submission
whereas pagespeed.conf has mixed directives, some in their own sections and some arrayed all over.
<Location /pagespeed_admin>
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
SetHandler pagespeed_admin
</Location>
<Location /pagespeed_global_admin>
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
SetHandler pagespeed_global_admin
</Location>
ModPagespeedMessageBufferSize 100000
ModPagespeedStatisticsLogging on
ModPagespeedEnableCachePurge on
ModPagespeedPurgeMethod PURGE
ModPagespeedFileCacheSizeKb 2048000
ModPagespeedFileCacheCleanIntervalMs 3600000
ModPagespeedFileCacheInodeLimit 500000
You get the idea.
Are there any tools that allow you to :
e.g.
manipulate the 'enabled' directive in the 'proftpd' section of fail2ban.conf?
or
manipulate the 'Allow from' directive in the 'Location /pagespeed_admin' section of pagespeed.conf?
or
manipulate the 'ModPagespeedMessageBufferSize' directive in the 'no particular' section of pagespeed.conf?
shell-script scripting
New contributor
I am wondering if there are any tools for use in bash scripts that can easily allow you to manipulate (add, remove, update) directives inside conf files?
e.g.
fail2ban.conf has grouped directives, each under their own sections.
[proftpd]
enabled = true
port = ftp,ftp-data,ftps,ftps-data
[postfix]
enabled = true
port = smtp,465,submission
whereas pagespeed.conf has mixed directives, some in their own sections and some arrayed all over.
<Location /pagespeed_admin>
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
SetHandler pagespeed_admin
</Location>
<Location /pagespeed_global_admin>
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
SetHandler pagespeed_global_admin
</Location>
ModPagespeedMessageBufferSize 100000
ModPagespeedStatisticsLogging on
ModPagespeedEnableCachePurge on
ModPagespeedPurgeMethod PURGE
ModPagespeedFileCacheSizeKb 2048000
ModPagespeedFileCacheCleanIntervalMs 3600000
ModPagespeedFileCacheInodeLimit 500000
You get the idea.
Are there any tools that allow you to :
e.g.
manipulate the 'enabled' directive in the 'proftpd' section of fail2ban.conf?
or
manipulate the 'Allow from' directive in the 'Location /pagespeed_admin' section of pagespeed.conf?
or
manipulate the 'ModPagespeedMessageBufferSize' directive in the 'no particular' section of pagespeed.conf?
shell-script scripting
shell-script scripting
New contributor
New contributor
edited 29 mins ago
Rui F Ribeiro
42.6k1688147
42.6k1688147
New contributor
asked 41 mins ago
conanDrumconanDrum
154
154
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
conanDrum is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f521247%2fbash-tools-for-conf-file-manipulation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
conanDrum is a new contributor. Be nice, and check out our Code of Conduct.
conanDrum is a new contributor. Be nice, and check out our Code of Conduct.
conanDrum is a new contributor. Be nice, and check out our Code of Conduct.
conanDrum is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f521247%2fbash-tools-for-conf-file-manipulation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown