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 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 =...
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 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,
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'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(...
I have tried a few different things with VLOOKUP in Excel to try to display data from one sheet on a new sheet in alphabetical order, but was unsuccessful.
The data I want in the new sheet is in columns A and Q of sheet 1. If Q is not null print the value of column A and column Q in column A...
I have an awk script that I'm using to print out the columns of a file and I have the column width set to 60 for each:
printf ("%-60s %-60s\n", value1, value2)
That works fine, but in this case, I want the fields to be tabbed, but obviously with a longer line X number of tabs will not keep...
I am trying to create a HTML form and pass the value of the search field to append it to the URL.
For example:
Search: 123456
Press "Go" and the destination URL becomes http://www.example.com/page1/123456.
I know how the basic forms work, but I can't figure out how to append the base URL...
How can I use a while loop to read a file that has spaces.
Ex. input.file looks like this:
Field 1 Field 2 Field 3
cat input.file | while read field1 field2 field3
do
...
done
The problem I'm having is that the while loop is breaking up the fields into 6 fields instead of 3.
Any...
All,
Does anyone know of any good resources for Atempo Time Navigator? The last 2 companies I've worked for had NetBackup and the new company has Atempo Time Navigator, which I'm not at all familiar with.
Thanks,
John
I am trying to parse a file and have a few fields that need to have character replacement done before the field is printed.
So the input file looks like this:
D10/04/2011
T$5.29
C
PA STORE
MSOMEPLACE, STATE
^
I need the ^D, ^T, and ^P to find what I want, but I then I want to set the...
I have an input file that's missing some data. I need to figure out how to only print the server name if there is no nameserver data.
server1.mydomain.com
search somdomain.com
nameserver 10.1.1.154
nameserver 10.1.1.155
server2.mydomain.com
server3.mydomain.com
server4.mydomain.com
...
I wrote an awk script that lets me parse the file and print the first host name, but I can't figure out how to get it to display other hosts in the same policy.
BEGIN{printf ("%-28s %-10s %-30s %-15s %-30s %-38s %-15s\n", "Policy", "Active", "Client", "OS", "Schedule", "Type", "Policy...
I have a URI that I'm trying to redirect back to the homepage on my site. For some reason since it contains hex I can't seem to get it to work.
A sample source URL is...
I had a zpool spare disk that failed and was replaced.
pool: diskpool01
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
diskpool01 ONLINE 0 0 0
raidz2 ONLINE 0 0 0
c0t0d0 ONLINE...
I'm having trouble parsing what should be something simple.
I have an input file with lines like this:
domain1.com
www.domain2.com
domain2.net
www.anotherdomain.nl
domain4.com
...
etc.
So usually there are 2 lines per record, but sometimes there will be just 1.
The desired output is...
I have a file in this format:
from: http://domain.subdomain.tld/path/to/redirect
to: http://newdomain.subdomain.tld/path/to/redirect/to
from: http://domain.subdomain.tld/path2/to/redirect?code=abc
to: http://newdomain.subdomain.tld/path2/to/redirect/to
I want to parse the file to give me...
I have a lot of pages on my site and would like to find a better way to manage changes I make to my CSS dropdown menu (from: http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm) for example.
If I update the menu on the homepage with a new item, I would then need to update all subpages...
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.