4
votes
4answers
142 views

Clean way to temporarily replace a config file?

I use a drawing program called Inkscape, which has both a GUI and a command line interface. When used on the command line, it has a large number of options that can only be controlled through a ...
4
votes
1answer
259 views

How to set firefox homepage from terminal?

I am trying to configure firefox from a script. I have already hit a wall establishing the deafault homepage. Found some old info what does not work anymore: echo ...
3
votes
3answers
246 views

How to make and apply (patch) one side diff?

I want to make a shell script that updates a config file. The file present on the server has information, like various IP addresses. The new file has more code, from new configs added to the system, ...
0
votes
3answers
417 views

wrapper command for sshd_config?

Is there a command to set settings in sshd_config, instead of manually editing the file? I would prefer it to do this way, because it's easier to automate. Otherwise I'd have to grep config with my ...
3
votes
1answer
555 views

Change screen “hardstatus” color dynamically

I show the hard-disk free space in hardstatus screen. But also I want change the color of this value when it's less than a value to alert me. I have done a script that it checks this and it returns a ...
5
votes
1answer
1k views

Replacing multiple lines in sed or awk

I'm trying to use sed or awk to replace 5 lines in a smb file but I just don't have any idea how to deal with the newlines.