This is the mail archive of the
cygwin-talk
mailing list for the cygwin project.
RE: Cat permissions
Robert Pendell wrote on 23 July 2008 17:18:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Igor Peshansky wrote:
>> On Thu, 17 Jul 2008, Christopher Faylor wrote:
>>
>>> On Thu, Jul 17, 2008 at 04:55:38AM -0600, Warren Young wrote:
>>>> The cat does not have permission to shred upholstery.
>>>>
>>>> The cat does not have permission to sleep on my PC, dropping hair into
>>>> its power supply.
>>>>
>>>> The cat does not have permission to be in the kitchen. Ever.
>>>>
>>>> The cat does not have permission to stand at the heels of people who
>>>> wish to walk backwards.
>>> I'm sorry but I don't think any of the above is POSIX compliant. You
>>> seem to have messed with your cat configuration. POSIX dictates much
>>> more permissive cat access.
>>
>> Besides, isn't cat always supposed to open things in binary mode?
>> Igor
>
> cat response.txt:
> 01101101 01100001 01111001 01100010 01100101 00100000 01100010 01110101
> 01110100 00100000 01110111 01101000 01111001 00100000 01110111 01101111
> 01110101 01101100 01100100 00100000 01101001 01110100 00100000 01110111
> 01100001 01101110 01110100 00100000 01110100 01101111 00100000 01110010
> 01100101 01100001 01100100 00100000 01101111 01101110 01101100 01111001
> 00100000 01111010 01100101 01110010 01101111 01110011 00100000 01100001
> 01101110 01100100 00100000 01101111 01101110 01100101 01110011 00111111
<kryten>That reminds me of an old android saying...</kryten>
> (google for binary to ascii converter -- spaced in groups of 8 in order
> to allow text wrapping)
Nahhh, that's not the way i do things. Search and replace:
sed -e 's/ 0111/ 7/g' -e 's/ 0110/ 6/g' -e 's/ 0101/ 5/g' -e 's/ 0100/ 4/g'
> 61101 60001 71001 60010 60101 00100000 60010 70101
> 70100 00100000 70111 61000 71001 00100000 70111 61111
> 70101 61100 60100 00100000 61001 70100 00100000 70111
> 60001 61110 70100 00100000 70100 61111 00100000 70010
> 60101 60001 60100 00100000 61111 61110 61100 71001
> 00100000 71010 60101 70010 61111 70011 00100000 60001
> 61110 60100 00100000 61111 61110 60101 70011 00111111
sed -e 's/0111 /7 /g' -e 's/0110 /6 /g' -e 's/0101 /5 /g' -e 's/0100 /4 /g'
> 61101 60001 71001 60010 65 00100000 60010 70101
> 74 00100000 77 61000 71001 00100000 77 61111
> 75 61100 64 00100000 61001 74 00100000 70111
> 60001 61110 74 00100000 74 61111 00100000 70010
> 65 60001 64 00100000 61111 61110 61100 71001
> 00100000 71010 65 70010 61111 70011 00100000 60001
> 61110 64 00100000 61111 61110 65 70011 00111111
sed -e 's/1101 /D /g' -e 's/0001 /1 /g' -e 's/0010 /2 /g' -e 's/ 0010/ 2/g'
> 6D 61 71001 62 65 20000 62 70101
> 74 20000 77 61000 71001 20000 77 61111
> 75 61100 64 20000 61001 74 20000 70111
> 61 61110 74 20000 74 61111 20000 70010
> 65 61 64 20000 61111 61110 61100 71001
> 20000 71010 65 72 61111 70011 20000 60001
> 61110 64 20000 61111 61110 65 70011 00111111
sed -e 's/1001 /9 /g' -e 's/0000 /0 /g' -e 's/1100 /C /g' -e 's/1110 /E /g'
> 6D 61 79 62 65 20 62 70101
> 74 20 77 61000 79 20 77 61111
> 75 6C 64 20 69 74 20 70111
> 61 6E 74 20 74 61111 20 70010
> 65 61 64 20 61111 6E 6C 71001
> 20 71010 65 72 61111 70011 20 60001
> 6E 64 20 61111 6E 65 70011 00111111
sed -e 's/1010 /A /g' -e 's/1111$/F/g' -e 's/0101 /5 /g' -e 's/0111$/7/g'
> 6D 61 79 62 65 20 62 70101
> 74 20 77 61000 79 20 77 6F
> 75 6C 64 20 69 74 20 77
> 61 6E 74 20 74 6F 20 70010
> 65 61 64 20 6F 6E 6C 71001
> 20 7A 65 72 6F 70011 20 60001
> 6E 64 20 6F 6E 65 70011 0011F
sed -e 's/0011/3/g' -e 's/1001/9/g' -e 's/0101/5/g' -e 's/0010/2/g' \
-e 's/1000/8/g' -e 's/0001/1/g'
> 6D 61 79 62 65 20 62 75
> 74 20 77 68 79 20 77 6F
> 75 6C 64 20 69 74 20 77
> 61 6E 74 20 74 6F 20 72
> 65 61 64 20 6F 6E 6C 79
> 20 7A 65 72 6F 73 20 61
> 6E 64 20 6F 6E 65 73 3F
<manual translate the last bit>
> 6D 61 79 62 65 20 62 75
m a y b e b u
> 74 20 77 68 79 20 77 6F
t w h y w o
> 75 6C 64 20 69 74 20 77
u l d i t w
> 61 6E 74 20 74 6F 20 72
a n t t o r
> 65 61 64 20 6F 6E 6C 79
e a d o n l y
> 20 7A 65 72 6F 73 20 61
z e r o s a
> 6E 64 20 6F 6E 65 73 3F
n d o n e s ?
Oh! Now why didn't you say that in the first place? Surely the answer is
obvious?
cheers,
DaveK
--
Can't think of a witty .sigline today....