Search Results

Search: Posts Made By: pondlife
Forum: Programming 03-24-2010
1,412
Posted By pondlife
SQL IF-THEN-ELSE issue
Hi All,

I have a table with the following columns:

sysName, date, time, cpuNum, cpuPercentageBsy

There are multiple system names and multiple CPU numbers.

I need to produce a report that...
2,201
Posted By pondlife
You guys are awsome :) Thanks :)
You guys are awsome :)

Thanks :)
2,201
Posted By pondlife
Thanks Dennis, Unfortunately my input comes...
Thanks Dennis,

Unfortunately my input comes out like this when I try your code:




Scratch that! It works :) Thanks!!

I just misread the output - it's not sorted and that confused me (not...
2,201
Posted By pondlife
awk script problem
Hi All,

I have the following input data:



That I'd like to look like this ($2 is the column I'd like it to appear in) where the entries are grouped by date:



The code I have at present...
4,266
Posted By pondlife
C++ struct pointers & functions
Hi All,

My latest assignment (practice not coursework!) is to write prototype interactive exam/test console application. I've used structs to store the question information (not sure if this was...
13,986
Posted By pondlife
Ooh I thought structs may help but I haven't used...
Ooh I thought structs may help but I haven't used them yet - I'll have a play with this and let you know how I get on :D

Thanks! :D

---------- Post updated at 04:41 PM ---------- Previous...
13,986
Posted By pondlife
C++ inputting multiple strings
Hi All,

We've been given the exercise below and I'm stumbling at the first block because we have to take in 20 student names and I don't know how to store them! :(

I know that I can create...
Forum: Programming 09-30-2009
3,064
Posted By pondlife
Ahh, yes. I think I've got it. Both have the same...
Ahh, yes. I think I've got it. Both have the same number of bits available but the signed char has the MSB reserved for its sign indicator.

It's good to get the basics down early on :D

Thanks...
Forum: Programming 09-30-2009
3,064
Posted By pondlife
Thanks GaneshCPUX that solved the problem :) ...
Thanks GaneshCPUX that solved the problem :)

...Now I have to get my head around why it fixed the problem ;)


EDIT: Ahh yes of course, a signed char has 1 byte - an unsigned has that extra bit...
Forum: Programming 09-30-2009
3,064
Posted By pondlife
C++ ASCI int values
Hi All,

I'm currently fiddling about trying to learn C++ and wrote a little program that outputs the ASCI values for numbers 0-255 but it's got a problem...

For the numbers 255 thru 128 it...
13,952
Posted By pondlife
Thanks Deepak! Works a treat :) I've not...
Thanks Deepak! Works a treat :)

I've not used multi-line sed before so messed about a bit and got this to work:

sed -e 's/[^0-9. ]*//g' -e 's/ \+/ /g' test.html
13,952
Posted By pondlife
sed to extract only floating point numbers from HTML
Hi All,

I'm trying to extract some floating point numbers from within some HTML code like this:

<TR><TD class='awrc'>Parse CPU to Parse Elapsd %:</TD><TD ALIGN='right' class='awrc'> ...
6,300
Posted By pondlife
Correction again - I must've done something wrong...
Correction again - I must've done something wrong before; the above code works perfectly at converting rows into columns :) hurrah!
6,300
Posted By pondlife
I've spotted a typo in my translation; correct...
I've spotted a typo in my translation; correct code should read:



This now works but I'd like to find a solution that works on my input file that includes the text column in $1...
6,300
Posted By pondlife
awk - Rotating an array 90 degrees
Hi All,

I have some data (below) that I need to rotate 90 degrees - in other words I want to flip each row into a column.



I've found the following code in the book "Effective awk...
59,946
Posted By pondlife
sed -i -n -e 's/NUMBER \[[0-9]*\].*/NUMBER /p' ...
sed -i -n -e 's/NUMBER \[[0-9]*\].*/NUMBER /p'

I've found the above code works but it removes all lines that don't match too... Anyone know how I can have the above work but leave lines that don't...
59,946
Posted By pondlife
I'm attempting something similar - I'm trying to...
I'm attempting something similar - I'm trying to identify the following and then remove it as well as anything that comes after it on the line:



I've played around with the code above but I...
4,840
Posted By pondlife
Brilliant that's what I needed thanks :) ...
Brilliant that's what I needed thanks :)

Believe it or not it's the first time I've used a while statement in one of my scripts! :)
4,840
Posted By pondlife
Sorry, I'm not explaining myself clearly. I...
Sorry, I'm not explaining myself clearly.

I would like the entire sentence to be treated as one string but it's getting split into component parts (each word).

Is there a way I can stop this...
4,840
Posted By pondlife
how to protect white space in for loop
Hi All,

I know there's a really simple answer to this but I just can't think of it :)

I'm processing a file which has lines containing white space i.e.



And I want to perform some awk on...
5,082
Posted By pondlife
You have a semi-colon at the end of the...
You have a semi-colon at the end of the filename... It doesn't look like a perl script so I don't think it should be there... I could be wrong...

Do an ls on the directory you're in and you may...
8,346
Posted By pondlife
Interestingly the next point in my script where a...
Interestingly the next point in my script where a file had to be manipulated exhibited the same problem - this file only had one field but the script saw just one entry eventhough there are many...
8,346
Posted By pondlife
fpmurphy - you were right! Thanks :) I just...
fpmurphy - you were right! Thanks :)

I just had to tweek it like this:



i.e. setting it to NULL.

I put this in my script before the cut's and it's doing the job!

Thanks again,

p.
8,346
Posted By pondlife
Sorry, must've posted my reply at the same...
Sorry, must've posted my reply at the same time...

Where do I put this? in my shell script?
8,346
Posted By pondlife
Here's some more testing to prove my point: ...
Here's some more testing to prove my point:







I am right in thinking this is not normal behaviour?
Showing results 1 to 25 of 89

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