02:44.00 | *** join/#gllug shai_ (n=Shai@l192-117-110-233.cable.actcom.net.il) |
05:00.32 | *** join/#gllug shai_ (n=Shai@l192-117-110-233.cable.actcom.net.il) |
05:13.33 | *** join/#gllug shai (n=Shai@l192-117-110-233.cable.actcom.net.il) |
07:16.03 | *** join/#gllug niv_one_three (n=niv@bzq-84-108-124-194.cablep.bezeqint.net) |
07:24.27 | niv_one_three | hi all , I see I got two ways to approch iptales |
07:25.06 | niv_one_three | either by running a script with each line executing a iptalbes command , or using a iptables_restore |
07:28.43 | niv_one_three | which is more common? |
09:37.03 | Leeds | put it in a script |
11:28.17 | *** join/#gllug Chr2s (n=chatzill@crag1.plus.com) |
12:09.35 | *** join/#gllug shai_ (n=Shai@l192-117-110-233.cable.actcom.net.il) |
12:46.40 | *** join/#gllug goibhniu (n=cillian@87-194-36-120.bethere.co.uk) |
13:01.38 | *** join/#gllug shai (n=Shai@l192-117-110-233.cable.actcom.net.il) |
13:53.22 | *** join/#gllug goibhniu (n=cillian@87-194-36-120.bethere.co.uk) |
14:50.17 | gregj | http://ars.userfriendly.org/cartoons/?id=20070812 |
14:50.19 | gregj | I don't get this |
14:50.39 | Ch0Hag | "If you don't know how to convert grams to ounces etc., ask your 8-year old to do it on google for you." |
14:50.56 | Ch0Hag | Yeah that was a bit weird. |
14:52.25 | antiphase | If children don't know how many grams there are in an ounce they should be locked in the cellar until they do |
14:52.38 | gregj | I don't get the walkiria, not the text... I am not a damn fool... |
14:53.02 | antiphase | It's a Viking |
14:53.12 | gregj | it is her |
14:53.14 | gregj | anyways |
14:53.20 | gregj | I don't get her there |
14:59.08 | *** join/#gllug goltor (n=goltor@77-99-148-49.cable.ubr06.hari.blueyonder.co.uk) |
15:01.06 | Leeds | gregj: have you ever heard the saying "it isn't over until the fat lady sings"? |
15:04.11 | Leeds | so... I went to the gym... and they have a bank of TVs in front of the machines |
15:04.51 | Leeds | I generally ignore whatever's on... but this evening, they were showing Dodgeball, Tomb Raider, Bourne Identity, and... |
15:04.59 | Leeds | a tourist show about Leeds, in Chinese! :-D |
15:25.43 | *** join/#gllug goibhniu (n=cillian@87-194-36-120.bethere.co.uk) |
16:44.38 | *** join/#gllug clive-h (n=ch@chills.demon.co.uk) |
16:53.14 | gw280 | father ted++ |
16:54.43 | *** join/#gllug eye69 (n=magnus@ipv6.upcore.net) |
17:03.15 | *** join/#gllug catalyst (n=catalyst@allegro/user/angelchild) |
17:24.40 | *** join/#gllug gregj_ (n=gj@81-186-226-63.citynet.pl) |
18:26.57 | *** join/#gllug mylesbraithwaite (n=mylesbra@CPE000625dd1ada-CM0012c9a00c02.cpe.net.cable.rogers.com) |
19:04.02 | *** join/#gllug gregj (n=gj@81-186-226-63.citynet.pl) |
20:47.47 | *** join/#gllug mylesbraithwaite (n=mylesbra@CPE000625dd1ada-CM0012c9a00c02.cpe.net.cable.rogers.com) |
21:14.01 | wethrin | whumpf |
21:15.02 | clive-h | indeed |
21:15.20 | wethrin | I got back only a few minutes ago |
21:33.05 | niv_one_three | can some one help me with this script: http://rafb.net/p/DTptgb57.html ? |
21:33.15 | niv_one_three | what am I doing wrong? |
21:33.44 | niv_one_three | it is ment to be called with $1 being a picture path |
21:34.09 | niv_one_three | then if my mobile doesnt answer the bluetooth ping it should email me the pictures |
21:34.38 | wethrin | What does 'echo $PICTURE' give? |
21:35.06 | niv_one_three | /path/to/picture.jpg |
21:35.29 | wethrin | So what's the trouble? |
21:35.52 | niv_one_three | am I using the for right? |
21:36.22 | niv_one_three | I am tring to triger by the first snap , yet get the rest of the pictures snapped |
21:36.44 | niv_one_three | so I will get five pictures, one of which has the intruder face |
21:37.07 | wethrin | Well. Does the 'find' command give you back a list of files separated by spaces? |
21:37.22 | niv_one_three | :-\ |
21:37.27 | niv_one_three | let me see |
21:37.28 | trousers | I does newlines, doesn't it? |
21:37.33 | trousers | s/I/It/ |
21:37.41 | wethrin | I think that may still be acceptable to a 'for' |
21:38.12 | wethrin | Rule 1 of shell scripting - check each block (or preferably line) works on its own |
21:38.43 | niv_one_three | so you think its ok from the looks of it ? |
21:38.49 | trousers | wethrin: I'm still looking for a project to code for D: |
21:39.22 | trousers | wethrin: I got bored today and made a dice roller for playing D&D with friends on Tuesday D: |
21:39.31 | trousers | Woe is me! |
21:40.04 | wethrin | niv_one_three: Except your 'grep' bit. You're redirecting output to null, then redirecting output to the file '2' |
21:45.43 | niv_one_three | ok , when the phone answers I get: 0 bytes from 00:0E:6D:45:97:A1 id 3 time 15.05ms |
21:46.15 | niv_one_three | ok , when the phone answers I get: 0 bytes from <MAC> id 0..5 time 15.05ms |
21:46.28 | niv_one_three | (err..) |
21:47.22 | niv_one_three | If this happens , I want PICTURE_PREF to get null |
21:47.29 | niv_one_three | am I doing it right? |
21:48.34 | niv_one_three | sudo l2ping -t1 -c6 <MAC> |grep bytes >/dev/hull && PICTURE_PREF=`echo "$PICTURE" |
21:48.35 | niv_one_three | ? |
21:50.37 | wethrin | Does 'bytes' not appear in the ping preamble? |
21:50.47 | niv_one_three | it does |
21:51.01 | wethrin | So it'll always return true |
21:52.18 | niv_one_three | if I disable my bluetooth I get: ' Can't connect: Host is down' |
21:52.45 | wethrin | You don't get something along the lines of: PING <MAC>, 56 data bytes ? |
21:53.07 | niv_one_three | no , thins it l2ping a bluetooth ping |
21:53.32 | wethrin | okay |
21:54.12 | niv_one_three | ment to say no, this is a bluetooth ping - different output |
21:54.43 | wethrin | But to save you the trouble of grepping, what's the exit code if the ping fails? |
21:55.28 | niv_one_three | this doesnt appear in the man l2ping |
21:55.35 | wethrin | try it |
21:55.44 | wethrin | ping something you know works |
21:55.46 | niv_one_three | can't I just plot it ? |
21:55.47 | wethrin | then 'echo $?' |
21:55.51 | wethrin | plot it? |
21:55.52 | niv_one_three | ok |
21:57.04 | niv_one_three | <PROTECTED> |
21:57.09 | niv_one_three | right? |
21:57.11 | wethrin | No |
21:57.17 | niv_one_three | :-\ |
21:57.21 | wethrin | sudo l2ping -t1 -c6 <MAC> |
21:57.21 | wethrin | echo $? |
21:57.37 | wethrin | assuming, of course, sudo will carry the exit codes up |
21:58.23 | niv_one_three | ok, when the host is down I got 1 |
21:58.57 | wethrin | And when it's up, you get 0? |
21:59.01 | niv_one_three | and when its up and working I get a zero |
21:59.05 | wethrin | Good |
21:59.09 | niv_one_three | so? |
21:59.10 | wethrin | So you just need then: |
21:59.38 | wethrin | sudo l2ping -t1 -c6 <MAC> && PICTURE_PREF=`echo $PICTURE` |
21:59.49 | wethrin | in fact...why do you even need the second bit? |
21:59.53 | niv_one_three | hmm.. |
22:00.08 | niv_one_three | I see it works.. |
22:00.20 | wethrin | Ahh....sorry, looking back at your script, you do need it |
22:01.20 | niv_one_three | would I need to sudo l2ping -t1 -c6 >MAC> 2> && PICTURE_PREF=`echo $PICTURE` |
22:01.21 | niv_one_three | ? |
22:01.47 | wethrin | You'd need to tell it where to redirect stderr to |
22:02.30 | niv_one_three | I think it doesnt matter, as I am cathing the exit code |
22:03.09 | wethrin | Depends. If it throws anything to stdout or stderr, you'll see it on the screen |
22:03.30 | niv_one_three | right - only good for debugging |
22:06.01 | wethrin | so you want to redirect all output from l2ping, or just error, or? |
22:06.29 | niv_one_three | seems ok with no 2> |
22:06.41 | niv_one_three | in fact the 2> yeilods an error |
22:06.46 | wethrin | of course it would |
22:06.55 | wethrin | You're not telling it where you want to redirect the output to |
22:07.05 | niv_one_three | oh ya |
22:07.08 | niv_one_three | 4got that |
22:09.41 | niv_one_three | seems to actually work :-) |
22:10.04 | niv_one_three | thank you very much wethrin for teaching me bash |
22:10.35 | wethrin | Just needs practice |
22:17.34 | morsing | wethrin! |
22:17.41 | wethrin | morsing! |
22:17.49 | wethrin | How was the drive back? |
22:18.10 | morsing | tiring |
22:18.42 | morsing | Did you get on the train? |
22:19.17 | wethrin | Yes |
22:19.25 | wethrin | Did you drop Russell off at Watford? |
22:20.23 | wethrin | Anyway. Thanks for suggesting Castleton. I had a really good weekend |
22:21.34 | morsing | wethrin: I left Russell at Watford Gap Services. He was getting annoying |
22:21.43 | wethrin | heh |
22:21.44 | morsing | wethrin: Did you hear about the murder? |
22:21.51 | wethrin | Yeah. On the M40 |
22:22.01 | morsing | wethrin: I had a great weekend as well - thanks :) |
22:24.37 | wethrin | Right. I think I should make an attempt to get to sleep |
22:24.55 | wethrin | night |
22:26.47 | gw280 | hrmmmmmmmmmmmmmmmm |
22:26.49 | gw280 | you're all plebs. |
22:27.11 | gw280 | especially wethrin |
22:27.17 | clive-h | nice of you to say so |
22:27.30 | gw280 | clive-h: he went to oxford. |
22:27.37 | clive-h | yes? |
22:27.42 | clive-h | and? |
22:27.49 | clive-h | so did I |
22:27.56 | gw280 | argh, then you're a pleb too |
22:28.20 | clive-h | and you're an upstart |
22:28.25 | gw280 | I see. |
22:29.14 | clive-h | errr i don't understand this |
22:29.37 | gw280 | ? |
22:29.57 | clive-h | They're both well regarded unis |
22:30.09 | gw280 | cambridge is clearly far better |
22:30.56 | clive-h | As far as it goes I like Cambridge town better |
22:31.42 | gw280 | mwahaha |
22:32.41 | clive-h | I should have taken that job at CUP years back |
22:32.57 | morsing | Beer |
22:33.06 | gw280 | morsing: you don't have a gun. |
22:33.32 | morsing | G'night all |
22:51.27 | *** join/#gllug flo|va-nu-pied (n=florent@unaffiliated/flovanupied/x-758957) |
22:55.10 | trousers | Evenin' |
23:22.33 | *** join/#gllug Ch0Hag (n=mking@knight.monnsta.net) |
23:47.44 | gw280 | LALALA |