Questions tagged [parsing]
46 questions
2
votes
2 answers
Having difficulty getting multi-line Powershell regex to work - no matches
I referred to several examples I was able to search, which seemed highly pertinent, but am still unable to get this to work.
My input looks like this, from a dhcp server stats command, and I've confirmed that $output is getting defined properly with…

Kevin
- 21
- 1
- 1
- 2
2
votes
5 answers
Check availability of my websites
How can I check the availability of websites from hosted by company?
Ping the server and checking if the services for IIS or Apache/Tomcat
is not enough. I want to see if the sites are responsive, if I can login.
My idea is to build a script using…

DeChinees
- 23
- 2
2
votes
2 answers
Ways to parse NCSA combined based log files
I've done a bit of site: searching with Google on Server Fault, Super User and Stack Overflow. I also checked non site specific results and and didn't really see a question like this, so here goes...
I did spot this question, related to grep and awk…

Kyle
- 534
- 1
- 5
- 14
2
votes
1 answer
Potential issues with tab delimited Logformat for apache 2.2x?
My employer has a CustomLog piped handler that reduces and preps the static web content machine access logs into a format that is kosher for being dumped into hadoop/hive. Unfortunately it hinges on a regex to convert the log format along with…

David
- 409
- 1
- 4
- 10
2
votes
2 answers
Parse/Edit Apache conf files with Ruby?
I need to write some scripts to make changes to Apache conf files, namely to add/update VirtualHosts. I plan on doing this in Ruby. before I write my own, are there any scripts/rubygems which allow Ruby to parse/modify Apache conf files,…

Josh
- 9,190
- 28
- 80
- 128
2
votes
1 answer
How to parse and filter on dict values on Ansible?
I'm currently working on a playbook to create a K8s cluster on Nutanix Prism Central. Everything run smoothly but i face an issue while a VLAN exists on one or more clusters.
In my case, a VLAN is represented by its name but also its UUID (this one…

motorbass
- 303
- 2
- 12
2
votes
1 answer
Extracting TCP application data from pcap file
Given a .pcap (or similar) file, I'd like to select one TCP connection and dump both application data streams (the one from the other peer and the one two the other peer) into two separate files on disk.
Let's assume that I have a .pcap file that…

Johannes Weiss
- 193
- 2
- 8
1
vote
1 answer
Procmail not execute shell command
i need launch a script when receive an email with specific subject, i've try fetchmail + procmail, this my configuration
.fetchmailrc
set no bouncemail
defaults:
antispam -1
batchlimit 100
poll imap.googlemail.com protocol IMAP auth…

stecog
- 985
- 5
- 11
- 21
1
vote
2 answers
Determine the end of a malformed (bad) http request
I'm implementing a HTTP server and wonder, if there is a defined way of when a server would determine a bad request as ended to
return the corresponding 400 status, and
accept the following data as new request starting a new attempt to parse…

Reizo
- 111
- 3
1
vote
1 answer
Changing all HTML absolute links to relative
I have a website that has a bunch of absolute addresses, and I need to move it (the whole contents of that website) up a level, so all of the absolute links need to be converted to relative.
I know about wget with --convert-links, but it doesn't…

BubbleFish
- 13
- 1
- 3
1
vote
3 answers
In PowerShell, how can I parse a preformatted output?
Is there existing tooling to take text-based output and pipe it to a dynamic object that can be queried as columns?
Specifically, I'm invoking ..
query session /server:MYSERVER
.. which is outputting ..
SESSIONNAME USERNAME ID…

stimpy77
- 459
- 1
- 5
- 12
1
vote
1 answer
Parse Apache logfile and ban IPs
My server is under attack, it is flooded with request with the following pattern:
Thousands of IPs
Each IP request the same page "GET / HTTP/1.1" with the same referrer 3-5 times per second (same timestamp).
So what I would need is a small shell…

Jmaxor
- 13
- 5
1
vote
1 answer
Shell script to parse ip:port from a text file
I get daily a text file with ip:port, one per line, example:
11.22.33.44:80
22.33.44.55:8080
33.44.55.66:7777
I would like to parse the first ip and port in two different variables, then write them into another file, wait execution of a program…

MuZo
- 13
- 1
- 3
1
vote
1 answer
Bash getops: allow, but not require arg
I'm writing a bash script, parsing options with getopts like this:
#!/bin/bash
while getopts ab: ; do
case $opt in
a) AOPT=1
;;
b) BOPT=$OPTARG
;;
esac
done
I'd like to have…

Frank Brenner
- 175
- 5
- 11
1
vote
1 answer
Obtain Bacula status in parseable format
Is it possible to obtain the status of Bacula Director in some parseable format?
It looks like the human-readable representation (one you can see when using bacula-console) is formed on the director side during the TCP control connection.

Eugene Pankov
- 247
- 1
- 12