Preklopeni binarniho souboru do TXT
Tom Meinlschmidt
hw na meinlschmidt.org
Pátek Leden 27 00:23:11 CET 2017
chyba.
ma byt hexdump -v -e '/1 "%03d" " “‘ … a "od -An -tuC"
jinak to bylo v osmickove..
btw - ten perl taky nefunguje spravne...
tm
> On Jan 27, 2017, at 0:02 , Tom Meinlschmidt <hw na meinlschmidt.org> wrote:
>
> test - 64kB soubor (data z /dev/random)
>
> cat file.txt | hexdump -v -e '/1 "%03o" "\n"' | tac | xargs -n8 | tr ' ' ','
>
> real 0m26.837s
> user 0m7.769s
> sys 0m11.485s
>
> bez zarovnavani na 8 sloupcu
>
> cat file.txt | hexdump -v -e '/1 "%03o" " "' | tac -s’ ‘ | tr ‘ ‘ ‘,'
>
> real 0m0.333s
> user 0m0.048s
> sys 0m0.022s
>
> nebo
>
> cat file.txt | od -An -b | cut -c 2- | tr ' ' '\n' | tac | xargs -n8 | tr ' ' ','
>
> real 0m28.978s
> user 0m8.125s
> sys 0m12.093s
>
> nebo
>
> cat file.txt | od -An -b | cut -c 2- | tr '\n' ' ' | tac -s ' ' | tr ' ' ‘,'
>
> real 0m0.404s
> user 0m0.051s
> sys 0m0.028s
>
> tm
>
>> On Jan 26, 2017, at 22:05 , Admin HWnews <hwnews na cncnet.info> wrote:
>>
>> Hmm prisel jsem na dalsi spek....
>>
>> Ja bych ten soubor potreboval jeste prevratit...tedy aby posledni bajt byl prvni. Nejakej napad?
>>
>> Prece to nebudu prohanet pres tabulku v DB...
>>
>> RV
>>
>>
>> Dne 24.1.2017 v 17:51 Tom Meinlschmidt napsal(a):
>>> odvolavam, co jsem neslibil. mate pravdu - potrebuje to -v
>>> tm
>>>
>>>> On Jan 24, 2017, at 17:37 , Tom Meinlschmidt <hw na meinlschmidt.org> wrote:
>>>>
>>>>
>>>> ? bash?
>>>>
>>>> $ printf 'e\0\0\0cho a\0\0b\n' | hexdump -v -e '/1 "%03o" "\n"' | xargs -n8 | tr ' ' ','
>>>> 145,000,000,000,143,150,157,040
>>>> 141,000,000,142,012
>>>>
>>>> tm
>>>>
>>>> On 2017-01-24 17:24, Petr Simek wrote:
>>>>> On Tue, 24 Jan 2017, Tom Meinlschmidt wrote:
>>>>>> co treba
>>>>>> hexdump -e '/1 "%03o" "\n"' /bin/bash | xargs -n8 | tr ' ' ','
>>>>> Kdyz jsou v souboru dve nuly za sebou tak to prvni vypise jako 060 a
>>>>> tu druhou jako * .
>>>>>> tm
>>>>> *------------------------------------------------------------------------*
>>>>> | Petr Simek APS JU |
>>>>> | psimek na jcu.cz |
>>>>> *------------------------------------------------------------------------*
>>>>> _______________________________________________
>>>>> HW-list mailing list - sponsored by www.HW.cz
>>>>> Hw-list na list.hw.cz
>>>>> http://list.hw.cz/mailman/listinfo/hw-list
>>>> _______________________________________________
>>>> HW-list mailing list - sponsored by www.HW.cz
>>>> Hw-list na list.hw.cz
>>>> http://list.hw.cz/mailman/listinfo/hw-list
>>>
>> _______________________________________________
>> HW-list mailing list - sponsored by www.HW.cz
>> Hw-list na list.hw.cz
>> http://list.hw.cz/mailman/listinfo/hw-list
>
> --
> ===============================================================================
> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache
>
> www.meinlschmidt.com www.maxwellrender.cz
> ===============================================================================
>
> _______________________________________________
> HW-list mailing list - sponsored by www.HW.cz
> Hw-list na list.hw.cz
> http://list.hw.cz/mailman/listinfo/hw-list
--
===============================================================================
Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache
www.meinlschmidt.com www.maxwellrender.cz
===============================================================================
Další informace o konferenci Hw-list