Tag Archives: BLACK

How to install a new switch and light off original switch end of run

By cfat002004

Hi, this is my first post and I can’t seem to find the answers I’m looking for so I decided to write my own scenerio and hope someone can help!

In my back room, I have a light switch that operates my back room light. I have no porch light outside. I am wanting to have two switches there, one for the original light and one for the new porch light. The original switch only has 1 BLACK, 1 WHITE, and 1 GROUND coming in. I’m guessing the power was taken to the light fixture and not to the switch since there aren’t more wires coming in. How do I pigtail off the original switch to have power for my new switch to operate my new light? I hope this makes sense. Anything will help. Thanks!

From: http://www.doityourself.com/forum/lighting-light-fixtures-ceiling-exhaust-fans/493266-how-install-new-switch-light-off-original-switch-end-run.html

awk Column difference

By chrissycc

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 to work out the difference between rows for certain columns. for example:

Code:

1359142876 RED 14 BLUE 3 GREEN 71 BLACK 65
1359135610 RED 13 BLUE 3 GREEN 71 BLACK 65
1359128178 RED 10 BLUE 3 GREEN 68 BLACK 60
1359121257 RED 8 BLUE 3 GREEN 66 BLACK 52
ETC


to

Code:

1359142876 RED 14 BLUE 3 GREEN 71 BLACK 65
1359135610 RED 1 BLUE 0 GREEN 0 BLACK 0
1359128178 RED 3 BLUE 0 GREEN 3 BLACK 5
1359121257 RED 2 BLUE 0 GREEN 2 BLACK 8
ETC


(contents of the first column doesn’t matter).

The other thing is, we don’t know how many columns there will be (could be additional pairs, “PINK 10″ for example).

As always any help would be appreciated

Source: FULL ARTICLE at The UNIX and Linux Forums

[Solved] awk Column difference

By chrissycc

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 to work out the difference between rows for certain columns. for example:

Code:

1359142876 RED 14 BLUE 3 GREEN 71 BLACK 65
1359135610 RED 13 BLUE 3 GREEN 71 BLACK 65
1359128178 RED 10 BLUE 3 GREEN 68 BLACK 60
1359121257 RED 8 BLUE 3 GREEN 66 BLACK 52
ETC


to

Code:

1359142876 RED 14 BLUE 3 GREEN 71 BLACK 65
1359135610 RED 1 BLUE 0 GREEN 0 BLACK 0
1359128178 RED 3 BLUE 0 GREEN 3 BLACK 5
1359121257 RED 2 BLUE 0 GREEN 2 BLACK 8
ETC


(contents of the first column doesn’t matter).

The other thing is, we don’t know how many columns there will be (could be additional pairs, “PINK 10″ for example).

As always any help would be appreciated

Source: FULL ARTICLE at The UNIX and Linux Forums