Search Results

Search: Posts Made By: chrissycc
1,652
Posted By chrissycc
Hi RudiC - thanks that is almost perfect..... ...
Hi RudiC - thanks that is almost perfect.....

The almost comes in as if I have a slightly different dataset where the final number isn't the end of a sequence, it becomes a sequence of its own,...
1,652
Posted By chrissycc
Ok, apologies.... Not homework/assignment,...
Ok, apologies....

Not homework/assignment, just a task I want to complete at work to make reporting on some Slurm scheduler output a bit more manageable.

CentOS 7, awk the tool of choice.

I...
1,652
Posted By chrissycc
Convert list of numbers to text range
Hi,

I'd like to take a list of numbers (with a prefix) and convert to a range, for example:


cn001
cn004
cn016
cn017
cn018
cn019
cn020
cn021
cn031
cn032
cn038
cn042
cn043
cn044...
1,664
Posted By chrissycc
Well that's embarrassing! I'm sure I tried that...
Well that's embarrassing! I'm sure I tried that in the very first instance, but it didn't work, hence trying to over complicate it! I must have got my code slightly wrong.

Thanks!
1,664
Posted By chrissycc
Shell variable as awk condition
Hi,

I'm trying to automate part of a script which uses awk to grab out some lines of a log file based on certain fields matching. For example, my log file looks something like the following (but...
874
Posted By chrissycc
Brilliant, thank you!
Brilliant, thank you!
874
Posted By chrissycc
Removing non-unique prefixed lines from a list
Not quite sure how to explain what I need to do (or how to title the post!) so will try and show it!

Basically I have a list of 'modules' which takes the form seen below, where there can be a...
4,922
Posted By chrissycc
Firstly, thanks everyone for their responses. ...
Firstly, thanks everyone for their responses. Cheers for the perl solution, unfortunately to answer your question, I'm not ok with perl (can never get my head round it!!).

I'm working on Centos...
4,922
Posted By chrissycc
Thanks for that Scrutinizer - so very close to...
Thanks for that Scrutinizer - so very close to what I need! If I've got it correct, it only displays if all three patterns are found, ideally it would be great if it could print every line with 1 or...
4,922
Posted By chrissycc
awk extract strings matching multiple patterns
Hi,

I wasn't quite sure how to title this one! Here goes:

I have some already partially parsed log files, which I now need to extract info from. Because of the way they are originally and the...
1,292
Posted By chrissycc
Brilliant, both work a treat, thank you! And...
Brilliant, both work a treat, thank you!

And I _think_ I follow what is going on, bonus!
1,292
Posted By chrissycc
[Solved] awk Column difference
Hi,

I've got what is probably quite an easy little (presumably) awk problem that I just can't seem to work out (mental block...I've already spent ages getting the data into this format!). I want...
3,440
Posted By chrissycc
Yep, that was a mistake! Brilliant,...
Yep, that was a mistake!



Brilliant, thanks - I think I was way overcomplicating it!



Will do, sorry!

Thanks very much :)
3,440
Posted By chrissycc
Modify line with dynamic variable in awk
Hi,

I'm guessing this is probably relatively straight forward to do in awk, but I just can't get my head round it! I have a log file of the following format:
3:03:35 (lmgrd) TIMESTAMP 10/14/2011...
2,277
Posted By chrissycc
Thanks both of you for the replies - I've used...
Thanks both of you for the replies - I've used Pravin27's suggestion and works perfectly!
2,277
Posted By chrissycc
bash script range calculations
Hi,

I have data in the following form:

AB001 10
AB002 9
AB003 9
etc
AB200 5

What I need to do is sum up the second value according to groups of the first, i.e. AB001 to AB030 the total...
2,688
Posted By chrissycc
Thanks for the responses and apologies for the...
Thanks for the responses and apologies for the formatting of the initial post. I went with Tyler's bash solution (I understand what is going on here, as opposed to the perl one). File was a bit...
2,688
Posted By chrissycc
Date string conversion within a file
Hi,

I have a log file that contains information along the lines of the following:

=========
jobnumber 322761
start_time Tue May 19 19:42:37 2009
end_time Tue May 19 20:11:28 2009...
2,961
Posted By chrissycc
This should work, again the sorting thing is a...
This should work, again the sorting thing is a little odd so I've left division in so you can sort based on that, but it should be easily removed. Probably much more elegant ways of doing it:

cat...
1,380
Posted By chrissycc
First (n)awk based solution seems to work...
First (n)awk based solution seems to work perfectly, thank you very much!

The data isn't actually ordered as I want it anyway, so can sort based on my own requirements.

Thanks :)
1,380
Posted By chrissycc
AWK (presumably) subtotalling question
Hi,
I'm guessing I can achieve this with awk, but maybe not, maybe I need more. Basically I have some data of the form:

System1
a=4
b=3
c=2
System2
a=1
b=3
System3
a=2
...
Showing results 1 to 21 of 21

 
All times are GMT -4. The time now is 02:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy