Conversation
Notices
-
@kirby function ifsrev { __temp=$(tr "$2" '\n' <<< "$1" | tac | tr '\n' "$2"); echo -n ${__temp:0:-1}; }
-
@Zerglingman good. i like this one.
-
@kirby I actually had need of it in mkcerts.sh.
-
@Zerglingman @kirby what does tht say if i might inquire¿ and is that python¿
-
@Lyx @Zerglingman @Owl @Owl looks like shell or awk
-
@Lyx @Owl @Owl @Zerglingman shell
-
@Lyx @Owl @Owl @kirby It's bash/sh.
I called it ifsrev because it's basically like using rev(1) but with internal field separator (a la read(1P)).
tr is a replacement function, so replace the second argument with a newline throughout the first argument (I probably should have done those the other way around so the body would be just second argument onward), then tac is inverse cat - read lines out from last to first - then tr it again to replace the newlines.
So it will produce incorrect output if the input contains a newline.
Also the last bit is to strip out random newlines/blanks of some kind, I forget what. Probably not actually necessary except when dealing with something extremely anal like ACME.
-
@Zerglingman @kirby @Owl @Owl thats extremely cool what made you think to make it reverso like that¿
-
@Lyx @Owl @Owl @kirby As I said, I needed it. I store my zone files from tld down, eg. au.rakka.zone for rakka.au. So that function converts between them.
-
@Zerglingman @kirby @Owl @Owl o knew u said u had to make it fir another projectbut i wasnt sure why thatd be helpful for you as a mechanism
-
@Zerglingman @kirby @Owl @Owl are you fucking kidding me¿ i love mech wartiors i had no idea it was still around ha
-
@Lyx @Owl @Owl @kirby I don't see the connection.
I probably should play more MWO though.
-
@Zerglingman @kirby @Owl @Owl vonnection to what¿
-
@Lyx @Owl @Owl @kirby Zone files and mechs.
.. Oh! You checked my site!
-
@Zerglingman @kirby @Owl @Owl i did¡ i couldnt see the first one but i can see the second one
-
@Lyx @kirby @Owl @Owl First one isn't a real domain.
... But apparently it could be:
yun-wuxin:[wisknort]:~$ dig @80.80.80.80 zone. | grep status
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3854
But this is what I am referring to:
[jasmine ~]# cd /var/named
[jasmine named]# ls
127.0.0.zone faith.harpy.zone managed-keys.bind.jnl
au.nerdshope.zone faith.harpy.zonee oz.rakka.zone
au.nerdshope.zonee localhost.ip6.zone parts.botegirl.zone
au.rakka.zone localhost.zone parts.botegirl.zonee
au.rakka.zonee managed-keys.bind tk.rakka.zone
.... I don't know where the "zonee" files came from... They're some bug. Whatever.
Anyway these files are just how I store the DNS stuff for my domains. I don't own rakka.tk anymore, and rakka.oz never worked (technically I still own it, I think).