Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [parsing]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
178 views

how to pull all VMs and its associated storage using govc

I'm able to connect to Vcenter using govc, however I would like get a list of all VMs within a specific folder with it storage(Related Objects) or datastore cluster in a comma separated format. Can ...
unknown's user avatar
1 vote
1 answer
278 views

Update JSON Payload using Powershell and Nutanix API

I'm currently writing a script that allow to update Nutanix VM Categories. Categories format is key:value and a VM may have no categories, 1 or multiple. Process to do that is quite simple : first I ...
motorbass's user avatar
  • 353
2 votes
1 answer
2k views

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 ...
motorbass's user avatar
  • 353
0 votes
1 answer
140 views

Odd behavior of bash array

I've recently encountered a strange script behavior and still don't understand y the array behaves this way. Here is a piece of the script: for nCDATAReg in $(seq 1 4) do sTestBuffer1=$(...
Talcott Parsons's user avatar
0 votes
1 answer
7k views

Ansible having an unhandled exception occurred while templating with lookup function

I'm currently building a playbook to test if some conf files are existing and then check the contents. Files are the following /etc/resolv.conf - then check if nameservers are well configured /etc/...
motorbass's user avatar
  • 353
0 votes
2 answers
829 views

sed: -e expression #1, char 113: unknown command: `['

I was wondering why isn't this code working, it is simple but for some reason it's not working. WIREGUARD_TEMP_NEW_CLIENT_INFO="# ...
yz7Ql4rxq7gY78evJ4Ao's user avatar
2 votes
1 answer
2k views

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 ...
Johannes Weiss's user avatar
0 votes
1 answer
570 views

OpenVPN server log - what is the "us=" identifier following the timestamp?

I use OpenVPN 2.3.10 in server mode, with logging set to verb 4. In the log, every line begins by a timestamp (Mon May 11 10:40:10 2020) and then us=, followed by a 5- or 6-digit number. What is this ...
zire's user avatar
  • 33
0 votes
1 answer
960 views

Extracting responses from Microsoft DNS Server Analytical logs

Is it possible to extract the DNS responses from Microsoft DNS Server Analytical logs (Microsoft-Windows-DNS-Server/Analytical)? The logs contain a field called "PacketData" in the EventData section ...
treiman's user avatar
  • 43
1 vote
1 answer
845 views

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 ...
stecog's user avatar
  • 1,005
2 votes
2 answers
6k views

Ansible parsing a JSON output

I'm using URI in order to get a JSOn output to a register called "vchosts" TASK [debug] ****************************************************************************************************************...
Vidanez's user avatar
  • 21
1 vote
2 answers
1k views

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 ...
Reizo's user avatar
  • 111
0 votes
0 answers
203 views

How to display traffic information in a parsable format?

tcpdump is my go-to tool to analyze traffic (together with Wireshark when I want an easier review of the pcap file). This fantastic tool fails however to deliver a predictable and easy to parse ...
WoJ's user avatar
  • 3,667
0 votes
1 answer
6k views

HAProxy errors in configuration file

I am trying to configure Pass through SSL using HAproxy but I get a lot of errors here my example error detected while parsing ACL frontend public_ssl mode tcp option tcplog ...
cyeostoragrn's user avatar
1 vote
1 answer
3k views

Changing all HTML absolute links to relative [closed]

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 ...
BubbleFish's user avatar
-2 votes
1 answer
320 views

puppet variable parsing inside quotes

How can I make the last exec resource parse variables? Currently it is coming out blank inside rc.local file as such: [root@server1 ~]# cat /etc/rc.local #!/bin/sh /usr/sbin/balance -b 127.0.0.1 ...
John Test's user avatar
3 votes
0 answers
443 views

I am looking for software that can parse emails and expect emails within a grace period [closed]

I manage a diverse set of backup systems, the only commonality is email notifications, There status being Failed, Success, Success with exceptions and unknown(where the email isn't sent). Case 1) ...
Jacob Evans's user avatar
  • 8,046
0 votes
1 answer
657 views

How I can parse email to get original recipient of an email? [closed]

I had email source with me and want parse original recipient of email. Lets say "[email protected]" is receiving a email, but in "To" list [email protected], [email protected] & [email protected] ...
Pravin's user avatar
  • 121
0 votes
1 answer
64 views

Which log file can I use for server port analytics?

Ideally I'd like to use piwik to track conversions from ads to server connections on port 5000 and port 5001 but I highly doubt that is even possible. I'm willing to settle for [ipaddress,time ...
T. Thomas's user avatar
  • 187
0 votes
1 answer
1k views

How to remove string and replace with content found in text file using batch script or powershell

How to remove string and replace with content found in text file using batch script. test.txt Version: 4.5.0 Import: //MPackages/Project/config/abc.txt #head //Packages/...
tipu's user avatar
  • 3
4 votes
4 answers
12k views

AWS - Script to create EC2 snapshots and automatically rename them

I'm currently trying to setup a script (using AWS CLI from an Ubuntu server) that will do the following: Create a snapshot of every existing volume. Those volumes already have a NAME tag (Like ...
Nicolas's user avatar
  • 53
3 votes
1 answer
715 views

Is there a way to determine the log format if given a ".log" file?

Is there a way to determine the kind of log (so that it can be parse correctly) if I have no prior information about the type (for eg. syslog, apache log, IIS log) of log it is? I am trying to write a ...
shruti gupta's user avatar
4 votes
2 answers
5k views

PowerShell - Add multiple strings to the same element in an array

So I have a array that I need to search through line by line and divide up by interfaces. My code loops through this file line by line. I want to split up the interfaces by the "!" character and add ...
runcmd's user avatar
  • 255
-1 votes
1 answer
150 views

how to set linux hostname based on flashdisk volume label [closed]

i'am running live linux, which run from FAT32 flashdisk since i run a lot of pc using this flashdisk, its difficult to identify which IP for its hostname, since its ip need to be dynamically ...
uray's user avatar
  • 255
7 votes
2 answers
6k views

Parseable NGINX accesslog files with delimiters

The default NGINX format is this: log_format combined '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$...
Kasper Grubbe's user avatar
0 votes
1 answer
208 views

Parse requests per OS type apache log

I'm trying to return a sorted list of requests per OS type, parsed from an Apache access_log file (not combined format as I need the user-agent info). Here's an example of the output I'm looking for: ...
Alex's user avatar
  • 25
1 vote
3 answers
3k views

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 ...
stimpy77's user avatar
  • 459
0 votes
3 answers
59 views

Listing usernames that are actually computers in Debian

I have inherited about 6 servers (all Debian based), and part of my project over the next year is consolidate everything into one server. There are 6 "domains" running from Samba3 installations, and I'...
Canadian Luke's user avatar
1 vote
1 answer
1k views

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 ...
Jmaxor's user avatar
  • 13
3 votes
2 answers
5k views

Scripts or tools to parse email message to remove attachment of particular name

I have configured Redmine email integration and while it's awesome, a major annoyance is that people have signatures that include a company logo, which then gets posted to every ticket they update via ...
tacos_tacos_tacos's user avatar
4 votes
1 answer
118 views

How to handle many daily emails from cron efficiently?

With each new server comes at least one more daily crontab email. The FreeBSD servers even send two: a daily and a security run output. Thanks to my obsession with virtualisation the number of emails ...
drumfire's user avatar
  • 1,709
4 votes
3 answers
11k views

How can I limit the output of the whois command?

How do I get only the owner/orgname from a PTR whois lookup? I don't need all the other entires, just the part about ownership (google in this case). Edit /usr/bin/whois 74.125.236.52 or any ip ...
Rajeev's user avatar
  • 261
1 vote
1 answer
4k views

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 ...
MuZo's user avatar
  • 13
5 votes
3 answers
147 views

Discover intended Foreign Keys from JOINS in scripts

I'm inheriting a database that has 400 tables and only 150 foreign key constraints registered. Knowing what I do about the application and looking at the table columns, it's easy to say that there ...
Jason Kleban's user avatar
2 votes
2 answers
14k views

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 ...
Kevin's user avatar
  • 21
76 votes
5 answers
317k views

How do I grep through binary files that look like text?

I have binary files that should be text (they're exported logs), but I can't open it with less (it looks ugly - it looks like a binary file). I found that I could open it with vi and I can cat it (you'...
Robyn Smith's user avatar
1 vote
1 answer
3k views

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 ...
Frank Brenner's user avatar
1 vote
1 answer
385 views

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 ...
Eugene Pankov's user avatar
164 votes
9 answers
556k views

How to remove empty/blank lines from a file in Unix (including spaces)?

How do I remove empty/blank (including spaces only) lines in a file in Unix/Linux using the command line? contents of file.txt Line:Text 1:<blank> 2:AAA 3:<blank> 4:BBB 5:<blank> 6:...
Michael Ellick Ang's user avatar
2 votes
5 answers
586 views

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 ...
DeChinees's user avatar
2 votes
2 answers
2k views

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... ...
Kyle's user avatar
  • 554
2 votes
1 answer
2k views

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 ...
David's user avatar
  • 419
2 votes
2 answers
2k views

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 ...
Josh's user avatar
  • 9,228
4 votes
1 answer
3k views

Parsing iometer results

How do your visualise your iometer results?
romant's user avatar
  • 526
8 votes
7 answers
28k views

Get list of user-agents from nginx log

I have nginx log file, and I want to find out market share for each major version of browsers. I am not interested in minor versions and operating systems. I would like to get something like this: ...
Željko Filipin's user avatar
0 votes
2 answers
621 views

Possible interface types that may show up in "ip addr show"?

Consider the output of a typical ip addr show on Linux: # ip addr show 1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127....
JCCyC's user avatar
  • 690
74 votes
12 answers
153k views

Do you have any useful awk and grep scripts for parsing apache logs? [closed]

I can use log analyzers, but often I need to parse recent web logs to see what's happening at the moment. I sometimes do things like to figure out top 10 ips that request a certain file cat foo.log ...
deadprogrammer's user avatar