Hi,
Thank you for that suggestion. It did work for the example, however my example wasn't clear enough. There are some WARN lines that I want to ignore. I want to capture ERROR and the subsequent lines below it until the next new line with a datestamp.
2022-04-07 12:46:14,624-0400 some text...
Hi,
I have a log file I want to parse. Lines normally begin like this:
2022-04-07 12:46:14,624-0400 some text here
2022-04-07 12:46:14,625-0400 some more text here
2022-04-07 12:46:14,625-0400 ERROR something
oh my gosh
this is terrible
bad error message
2022-04-07...
Hi,
I've deployed a temporary hacky workaround of using a for loop with the employee_departments.txt file and using sed to replace all of the values, but I'm sure there is a much more efficient way to accomplish this.
Thanks!
Hi,
I have an awk script that I've been using to parse some data from a file. The source data has some things that are inaccurate, so I'd like to replace certain strings with data from another file.
Here's what I originally was using for one section:
/^department:/{departmentnumber =...
Hi,
I finally resolved the issue. I found that "PrivateTmp=true" is set in /usr/lib/systemd/system/httpd.service. I set it to false which resolved the issue.
systemctl daemon-reload
service httpd restart
Thanks,
John
Hi,
Does anyone have any troubleshooting tips or ideas? It was a simple HTML form and PHP script, but it's no longer working on the new OS and PHP version.
If there's an alternate way to achieve the same thing I'd be open to doing it another way.
Thanks,
John
Hi,
I tried removing the header redirects, but I'm not seeing any logging to indicate what the problem is.
As I mentioned, I run the same php code and form on CentOS 5 and 6 with earlier versions of PHP and don't have any issues. This issue is on CentOS 7 with PHP 5.4.16.
Any other thoughts...
Hi feherke,
The only issue I'm having is that when I fill out the form on the HTML page it's not creating the .txt file.
All I'm attempting to do is to have the 2 form fields write to a text file. I have the code working fine on a few different machines, but for some reason in this case the...
I have a PHP script which I'm using in a html form. It works fine in PHP 5.3.3, but not on 5.4.16.
<?PHP
$filename = "/tmp/restart.txt"; #Must CHMOD to 666
$text = $_POST['requester']; # Form must use POST. if it uses GET, use the line below:
$text2 = $_POST['reason']; # Form must use POST...
Hi,
I tried the following, but I don't think it's fully working as expected.
SetEnvIf Origin "^http(s)?://(.+\-)?(.+\.)?(mysite\.org|mysite2\.com)$" CORS_ALLOW_ORIGIN=$0
Any thoughts on what's needed to support URLs like this:
uat-www.mysite.org
dev-www.mysite.org
uat-www.mysite2.com...
Hi,
I am doing some regex to allow CORS for specific domains. Currently I'm using the following:
SetEnvIf Origin "^http(s)?://(.+\.)?(mysite\.org|mysite2\.com)$" CORS_ALLOW_ORIGIN=$0
This should allow *.mysite.org and *.mysite2.com via CORS. The problem I'm encountering is that if the DNS...
Hi Feherke,
Thank you for the tip. I had no such luck with the RewriteRule running Apache 2.2.15.
Also, I don't think the rule you mentioned would also strip off any trailing ?null string, but I suspect that could be a 3rd variable you add to the string.
Any other suggestions?
Thanks,
John
Hi,
I've been trying to craft a RewriteRule to alleviate an issue we're seeing with some inbound links. Something is appending ?null to the URL.
I tried several RewriteCond and RewriteRule options I could think of to no avail. A sample URL is...
Hi,
I was able to get this one-liner working when it wasn't with other code:
/^departmentNumber:/{FS="-"; gsub("departmentNumber: ", "") ; departmentnumber = $1; department = $2; fulldepartmentname = $1"-"$2}
But when I put it back in my awk script it breaks and doesn't print anything at...
Hi,
I'm sure feherke's is much more efficient, but I came up with this:
ps | awk -F'--log-file=' '/log-file/{print $2}' | awk '{print $1}'
Thanks,
John
Hi,
I'm writing an awk script to parse an input file. The input file has many fields about a user. There is one field I need to break up into pieces.
...
givenName: John
sn: Smith
st: CA
postalCode: 90210
departmentNumber: 999-IT Department
...
I am already calling the script with awk -F"...
I have a basic PHP script that I use to upload files. I can hard code the destination in the PHP script, but I want to set it dynamically via a variable I issue via curl.
Here's the script I am working on:
<?php
$target_path = "$destination";
$target_path = $target_path . basename(...
Hi Skip,
Thank you for the help! I am using Google docs for this item and I took your suggestion and tried using a pivot table which worked great! The tutorial is available here:
http://googleenterprise.blogspot.com/2011/05/pivot-tables-now-in-google-spreadsheets.html
John
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.