Hi all, probably an easy one, but as a totally newbie to e.g. Perl or C, I do not really understand what the simple octetstring 2 ascii perl script someone gave me a few years ago that is intended to convert an octet string to an ascii text does:
printf "%s\n",pack "H2" x scalar(split /\./, $ARGV[0]), split /\./, $ARGV[0]; What it does is clear - but not how it does it. So I am not able to convert such things as whole NCM configuration files given as an attribute's value in octet string format. (I'm on Solaris.) It contains ASCII #10 characters which are obviously ignored by the perl line above, so what I get is a one-line-string with concatenated lines. I'm sure the solution is clear, but I simply can't grab it. What I also did was try to replace all ".A." in my one line octet string by a newline, but didn't succeed with awk and sed, and my tr knowledge is rather non-existant, so a simple tr ".A." "\n" to have single lines to feed my perl script with doesn't do the job either. Whoever knows what I mean: please enlighten me! :) Thanks a lot. Freundliche Grüße / Best regards Christian Fieres Mainova AG Planung und Betrieb Infrastruktur (M3-ON2) Service Operation Center Solmsstraße 38 60623 Frankfurt Telefon / Phone (069) 2 13-2 36 17 Mobil / Mobile (0170) 5 60 15 63 Telefax / Facsimile (069) 2 13-9 62 36 17 E-Mail [email protected] Mainova Aktiengesellschaft - Solmsstraße 38 - D-60623 Frankfurt am Main Vorsitzende des Aufsichtsrates: Oberbürgermeisterin Dr. h. c. Petra Roth - Vorstand: Dr. Constantin H. Alsheimer (Vorsitzender), Lothar Herbst, Joachim Zientek Sitz der Aktiengesellschaft: Frankfurt am Main - Amtsgericht Frankfurt HRB 7173 - USt-ID-Nr. DE 114184034 Müssen Sie diese E-Mail wirklich ausdrucken? - fragt der Mainova Energiecoach. Mehr Tipps und Antworten zum Thema Energieeffizienz unter http://www.mainova-energiecoach.de --- To unsubscribe from spectrum, send email to [email protected] with the body: unsubscribe spectrum [email protected]
