Hi All,
I am using AWK to parse lines of a logfile to extract pertinent data but have hit a problem that I'm not even sure I can solve with AWK.
Within the logline I have three bracketed sections; the first of which are the fixed fields. i.e There are always seven values. The second and third...
Hi All,
Just a quick puzzle really as I have found a suitable workaround, but I was attempting to print the fields from the below example loglines from the word AFTER to the numerals after the word took;
i.e. AFTER Initial lock of quote took 13
AFTER getData for 46681 took 0
2011-05-17...
Hi All,
Ive written some code to calculate a mid point based on the data in four fields. I would like to include another logical check to establish if either of two fields are less than 1,000,000, and if so use 1,000,000 as the value.
i.e. if either (or both) of $7 and $10 are less than 1m...
Hi,
I have a python script that produces a report detailing amounts.
When run from the command line it produces the report in the correct format. When run from con it omits the commas.
I'm guessing that this has something to do with the shell it runs under, however, I have tested this from...
Hi,
For the life of me I cannot work out why this is failing. Instead of the expected result of an email being fired everytime a line containing "failover" occurs it is instead randomly sending emails that lists the full contents of the directory from which the script is run i.e. as if I have...
Hi,
I have a piece of code I'm using to save a workbook to a sharepoint site. Although it is working as expected I have found that after using the Sub it breaks hyperlinks that I have embedded in other cells. I have seen from t'internet that there are some bugs around hyperlinks but was...
Hi All,
I have to write something that will monitor a logfile in real time, check for network latency and email if these conditions are met. I have a working script that performs the conditional element (thanks to Feherke) but I am now struggling with the logic of how to ensure that only new...
Hi All,
Another AWK problem beyond my current skillset.
I have a logfile which I need to retrieve a specific number value from. Unfortunately there is no static column in the log to pull this data from. The only constant is that the value is always in the field after the word "took". I have...
Should be simple, but haven't used awk in a while and am currently snowbound in the uk, so trying to do this from a cygwin emulation on a dodgy laptop; however, i'm sure i'm making it more difficult than it needs be.
Problem: Retrieve data from log file based on two parameters;The order and...
Hi All,
I'm having the usual nightmare trying to get a sed command to accept variables in a substitution; It works on the command line and I can see that the shell has interpolated the variable correctly by using echo, but when I run it in the script it just doesn't update.
File: Pre SED...
Hi,
I have a sample file produced from a sql statement that I would like to format into something excel readable. The data is produced for each hour so the full file will contain 36 rows minimum;
Sample data;
GTS 56
FID 78
WCK 92...
Hi All,
I'm new to this forum and have a very rudimentary knowledge of SQL, i'm a Unix Admin by trade...
We have just taken on another application though which requires some sql skills above and beyond my "current" capability.
I need to insert fixed values into a table , based upon the record...
Hi All,
I've just returned from two weeks in Italy and the brain is fried, consequently can't get my head around this today.
I have a script that takes a file and splits it based upon the data between the /^imp_/ match in the below nawk statement.
This has been working great, but while I was...
Morning All,
I have a requirement to copy files from a source dir to a destination dir based on the following criteria;
The source files cannot be changed / modified or moved and will hold 7 days worth of data. These files are application generated and can be created at any time of day.
The...
Anyone seen this before;
When a new policy is created using the copy to new facility it appears that any exclusions added or removed from either of the policies will automatically update its corresponding partner.
Is this a feature (Bug)?
I'm struggling to think of a reason why this would be...
Hi All,
NBU 6.0 to 6.5
Solaris 10
Well as the subject suggests the upgrade was smooth, much better than from 5.1 to 6.0 I may add, but....
when I run up jnbSA it decides that my root password is incorrect. It isn't, on this occasion I am right and NBU is wrong.
I've added a user to the...
Hi All,
Is there an Apache equivalent to the magnus.conf file in iPlanet?
I have a need to expand the fields when viewing files from a browser.
Previously we had iPlanet/SunOne installs and this was achieved by adding the following to magnus.conf;
Init fn=cindex-init widths=52,18,8,33
I'm not...
Hi All,
Is it possible to use a variable within an Open statement to enable looping?
Basically, I have a number of log files from Backup Exec that I pull into Excel to retrieve job data e.t.c
Open "X:\WINTELbackups\Backup Logs\UKLDNSERV1\BEX60.txt" For Input As #1
What I would like to be...
Hi All,
I'm trying to write a ksh script that uses a nawk statement embedded between two for loops.
My issue is with getting nawk to recognise the second condition, in this case the $state.
It works fine for just the $robot and does what I expect it to.
i.e
nawk 'BEGIN {OFS=" "}...
Hi All,
Solaris 9
Netbackup 6.0 MP6
After having upgraded from MP4 I am missing RedHat versions from the pull down when adding clients.
Anyone experience the same thing?
Thanks
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.