All Questions
8 questions
5
votes
1
answer
551
views
sed to fix a messy nginx.conf
I have a few servers to fix that repeatedly get their nginx.conf file messed up due to a rogue deploy script.
These are the three sed commands I'm using to fix at present:
...
6
votes
1
answer
104
views
Extracting Linux configuration information using Bash and Perl
For few days I'm thinking about making my code faster and using less CPU. This code is a statusbar that runs in a loop. I'm asking because there's a lot of perl and I'm wondering if it could be done ...
4
votes
2
answers
2k
views
Using sed regular expression to extract domain name from file
I'm learning regex with sed to extract the last field from file named "test". The method I'm trying gives desired output.
Please suggest if this method Im trying is ...
5
votes
2
answers
118
views
Bash script to replace substrings in a file with strings
I am an editor of the Funtoo Linux wiki and was looking to create a shell script that would help to ease the updating of pages on the wiki that use old tags by replacing certain deprecated tags with ...
5
votes
1
answer
5k
views
Extracting emails from a file and writing them to another file
The code below works fine for me. Is there any way that I can improve this code more? Note: delimiter is single whitespace only for email address.
getmail.py
...
5
votes
3
answers
118
views
Repeatedly fetching a URL until the response contains "state: INIT"
I am working on a project in which I need to make a URL call to one of my servers from a bash shell script.
http://hostname.domain.com:8080/beat
After hitting ...
5
votes
2
answers
188
views
Packaging a single-file Python copy-tool
I'm currently working on a very simple one-file project:
Lumix provides the possibility for the camera TZ41 (and others) to load GPS data and tourist information from a DVD to a SD-card so that you ...
6
votes
1
answer
4k
views
Calculate query coverage from BLAST output
I have a BLAST output file and want to calculate query coverage, appending the query lengths as an additional column to the output. Let's say I have
2 7 15
<...