sicelo | a key has fallen out of my hwkbd | 12:19 |
---|---|---|
sicelo | what's a good glue to put it back on? i don't want tomake a mistake and use something that might make matters worse | 12:19 |
KotCzarny | order replacement kb inlet? | 12:20 |
sicelo | not practical in my case | 12:20 |
sicelo | the key is not lose. just need the right glue to stick it back on | 12:22 |
sicelo | *lost | 12:23 |
KotCzarny | i see replacement kb for ~4 usd | 12:24 |
KotCzarny | h3droid is only for allwinner H2+/H3 soc | 12:26 |
KotCzarny | erm, -ECHAN | 12:26 |
Vajb | sicelo: I would go with 3M products or some other syanoachrylate glue. | 12:43 |
Vajb | or some two-component glue, but I think that would be messier. | 12:44 |
sixwheeledbeast^ | Trying to merge a list of txt files into one stripping the first line of each. However it would appear bash is processing wildcards not in filename order so output is not in date order. Anyone think of a solution without listing a string of filenames? | 13:14 |
KotCzarny | bash required? | 13:15 |
sixwheeledbeast^ | nope desktop I think it's multithreading the tail command | 13:15 |
KotCzarny | some scripting language might be nicer if it's complicated | 13:16 |
Vajb | can't you sort them after merging? | 13:17 |
sixwheeledbeast^ | Tried just tail +2 and piping find into xargs tail +2, files seem to be processed in eights (8 core desktop) | 13:18 |
KotCzarny | hmm, internet says globbing guarantees alphabetical order | 13:18 |
sixwheeledbeast^ | I expected bash to maintain my intentional file order of foofile00 foofile01 etc | 13:19 |
KotCzarny | in php i would just populate array of arrays, drop first element in each subarray and iterate on final list | 13:19 |
KotCzarny | (yes, i'm a fan of php-cli) | 13:20 |
Vajb | I think I would use java for that task. | 13:20 |
Vajb | (just because we have had exhaustive java courses) | 13:21 |
sixwheeledbeast^ | Just running straight from the shell, I suppose if there is no straight forward way I could list the array of 60 odd files with tab complete... | 13:22 |
Vajb | lets hear what exactly you are trying to do? | 13:22 |
KotCzarny | btw. sorting depends on locale set | 13:23 |
sixwheeledbeast^ | ah locale | 13:23 |
sixwheeledbeast^ | so for example "tail -q -n +2 *.txt >> conc.csv" | 13:26 |
KotCzarny | hmm | 13:27 |
KotCzarny | tail would concatenate then cut probably | 13:27 |
KotCzarny | you probably need for each in *.txt; do tail -q -n +2 >>conc.csv; done | 13:27 |
sixwheeledbeast^ | also "find . -name "*.txt" | xargs -n 1 tail -n +2 >> concx.csv" | 13:27 |
KotCzarny | erm. | 13:28 |
KotCzarny | for each in *.txt; do tail -q -n +2 "$each" >>conc.csv; done | 13:28 |
KotCzarny | unless i misunderstood your question | 13:28 |
sixwheeledbeast^ | nope perfect, you understood exactly | 13:30 |
sixwheeledbeast^ | the power of a loop, er | 13:31 |
KotCzarny | check if it globs the files in the right order | 13:32 |
KotCzarny | otherwise you could simple replace it with sort | 13:33 |
KotCzarny | ie. for each in `ls *.txt|sort`; do .. | 13:33 |
KotCzarny | (as long names dont have spaces or weird chars | 13:33 |
sixwheeledbeast^ | Output is in correct order :) | 13:35 |
KotCzarny | yay for cmdline! | 13:36 |
sixwheeledbeast^ | \o/ | 13:36 |
totalizator | KotCzarny: do not simplify every code you get :E https://github.com/kubernetes/kubernetes/blob/ec2e767e59395376fa191d7c56a74f53936b7653/pkg/controller/volume/persistentvolume/pv_controller.go | 13:59 |
KotCzarny | i see a lot of missing elses :P | 14:00 |
totalizator | the shuttle flies too fast - I can't see :E | 14:05 |
KotCzarny | totalizator: my shuttles are usually compressed into high velocity bullets that pierce through anything | 14:13 |
totalizator | I'll stick with my bike, thanks | 14:16 |
sixwheeledbeast^ | After Vajb mentioned merging first I came up with this solution :) "cat *.txt >> conc.csv && sed -i '/String/d' conc.csv" | 14:28 |
sixwheeledbeast^ | Don't know why i didn't think of that earlier... | 14:28 |
KotCzarny | or just grep -v ? | 14:28 |
sixwheeledbeast^ | Possibly I seemed to gravitate towards sed -i. Seems cat works in file order tho whereas tail didn't, makes sense. | 14:33 |
DocScrutinizer05 | glob sorts | 14:35 |
DocScrutinizer05 | per definition | 14:35 |
DocScrutinizer05 | why not pipe? cat *.txt | sed -i '/String/d' >conc.csv | 14:36 |
DocScrutinizer05 | err without "-i" | 14:36 |
inz | Useless use of cat ;) | 14:36 |
* KotCzarny mreoows | 14:37 | |
DocScrutinizer05 | prolly sed '/String/d' *.txt >conc.csv also works | 14:37 |
KotCzarny | inz, cat is nice as a pipe starter | 14:37 |
inz | It is usually more readable, yes | 14:37 |
KotCzarny | easier to modify ending params than to move the cursor back further | 14:37 |
KotCzarny | so it has its uses | 14:37 |
KotCzarny | a bit offtopic, what triggers gsm network to send internet/mms configuration? | 14:40 |
DocScrutinizer05 | location register server does that, on sensing a new IMEI on an account | 14:41 |
DocScrutinizer05 | or on sensing a roaming user | 14:41 |
DocScrutinizer05 | afaik | 14:42 |
KotCzarny | DocScrutinizer05: so putting card into another phone, letting it go into network, then putting card back should work for sending config again | 14:43 |
KotCzarny | unless they keep a list of seen imeis per user | 14:43 |
sixwheeledbeast^ | It was due to finding cat was processing the files in the correct order but it seems just sed works fine too. | 14:43 |
KotCzarny | now i need another phone to confirm, hrm | 14:44 |
sixwheeledbeast^ | Here once SIM is seen on the network it doesn't prompt you to download config info again unless you request it from the network. | 14:51 |
DocScrutinizer05 | KotCzarny: depends, prolly not tsince the "old" IMEI gets stored | 14:52 |
DocScrutinizer05 | yes, keeping list of seen IMEIs seems to be exactly what they do | 14:52 |
sixwheeledbeast^ | s/SIM/IMEI/ ^ is most likely | 14:52 |
DocScrutinizer05 | once that IMEI had been seen on that SIM/account, it won't usually get a second SMS | 14:54 |
DocScrutinizer05 | but I'm not completely sure, done too few tests to have a sufficient sample base | 14:54 |
DocScrutinizer05 | I also guess there must be some "aging" | 14:55 |
KotCzarny | dont have another phone handy atm, but will check in an hour | 14:56 |
DocScrutinizer05 | after all you could have nuked the settings by inserting another SIM | 14:56 |
KotCzarny | but it could've been different network, which your home network wouldnt know about | 14:57 |
KotCzarny | so it might be bound to sim+imei combination | 14:57 |
DocScrutinizer05 | sp maybe they send a SMS when they didn'T see that account|IMEI tuple for >1 week or whatever | 14:57 |
DocScrutinizer05 | so* | 14:58 |
DocScrutinizer05 | SIM=IMSI=account, yes | 14:59 |
KotCzarny | yup | 14:59 |
KotCzarny | i just find it weird it wasnt standardized and left for user side | 15:00 |
DocScrutinizer05 | most providers offer a web service to trigger semding of config SMS | 15:02 |
DocScrutinizer05 | "register new phone" or somesuch | 15:02 |
KotCzarny | the one i'm currently helping with doesnt | 15:02 |
DocScrutinizer05 | hmm | 15:02 |
KotCzarny | or at least they dont expose that information anywhere | 15:03 |
DocScrutinizer05 | ask their hotline | 15:03 |
KotCzarny | also, it's a virtual operator | 15:03 |
DocScrutinizer05 | could also simply be a SSC/USSD, or a SIM with "cinfigure internet" to 666, or whatever | 15:04 |
DocScrutinizer05 | well, either they operate on their own network ID (2 digits country + 3 digits Provider-ID) or you are using then genuine network operator's location register and thus should ask their hotline | 15:07 |
DocScrutinizer05 | what does the phone show? "virtual" üprovider name, or genuine network operator name? | 15:09 |
KotCzarny | nah, they use real operator network, numbers are probably routed inside the network by operators using shared database | 15:09 |
KotCzarny | they say it shows suboperator name (ie. different than real operator) | 15:11 |
DocScrutinizer05 | then they use their own database, either on own hardware or virtualized on genuine operator's Location Register | 15:20 |
sixwheeledbeast^ | You can either text a number or use the web portal to resend the config here. | 15:21 |
sixwheeledbeast^ | Also customer service can force the prompt to appear again. | 15:23 |
KotCzarny | i'm looking for an automatic way, preferably without customer service call, people are allergic to it | 15:24 |
DocScrutinizer05 | oh, so you ask how providers *should* do it? | 16:26 |
DocScrutinizer05 | keep a list of IMSIs in Location Register user account. Delete those that had not been seen logged in for a week or two. Send a SMS to each new IMSI | 16:28 |
DocScrutinizer05 | allow manual trigger of SMS sending. Ideally by SMS and by web interface | 16:29 |
DocScrutinizer05 | rate-limit to max 10 config SMS / day | 16:31 |
DocScrutinizer05 | to defeat all sorts of hiccups and exploits | 16:31 |
KotCzarny | yum, manual trigger with some service code would be best | 16:31 |
DocScrutinizer05 | SMS "new" to 666 | 16:32 |
KotCzarny | currently its up for operator to setup such codes, which varies wildly between them | 16:32 |
DocScrutinizer05 | or dial *NEW-INTERNET# | 16:33 |
KotCzarny | and its even worse with MVOs | 16:33 |
DocScrutinizer05 | better: *NEWPHONE#" | 16:33 |
KotCzarny | or just INTERNET | 16:33 |
KotCzarny | and MMS | 16:33 |
KotCzarny | which some of them do now | 16:34 |
KotCzarny | but not all | 16:34 |
bleb | are there any good tools to determine which bands a phone supports? | 20:11 |
bleb | like i have an e66 and i want to figure out if it's the US version or non-US version | 20:11 |
Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!