From owner-freebsd-hackers Fri Feb 2 2:37:36 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.189]) by hub.freebsd.org (Postfix) with SMTP id CFD8E37B491 for ; Fri, 2 Feb 2001 02:37:12 -0800 (PST) Received: (qmail 7684 invoked by uid 1000); 2 Feb 2001 10:35:36 -0000 Date: Fri, 2 Feb 2001 12:35:36 +0200 From: Peter Pentchev To: "Louis A. Mamakos" Cc: Jean-Marc Zucconi , Warner Losh , hackers@FreeBSD.ORG Subject: Re: EBCDIC -> ASCII Message-ID: <20010202123536.G328@ringworld.oblivion.bg> Mail-Followup-To: "Louis A. Mamakos" , Jean-Marc Zucconi , Warner Losh , hackers@FreeBSD.ORG References: <20010131214403.G17598@ringworld.oblivion.bg> <200101311642.f0VGgXv06307@iguana.aciri.org> <200102020036.f120as934631@harmony.village.org> <200102020049.f120n6M50078@freefall.freebsd.org> <200102020534.f125Yl812054@whizzo.transsys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200102020534.f125Yl812054@whizzo.transsys.com>; from louie@TransSys.COM on Fri, Feb 02, 2001 at 12:34:47AM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Feb 02, 2001 at 12:34:47AM -0500, Louis A. Mamakos wrote: > > >>>>> Warner Losh writes: > > > > > Even the name (dd) comes from IBM's control language (JSYS?). > > > > Huh! I never realized that. > > //GO.SYSIN DD * > > ... > > // > > Where are my punch cards? :-) > > man 6 bcd Come to think of it, since bcd(6) doubles as ppt(6), why isn't there already something like the attached script? :) G'luck, Peter -- This sentence was in the past tense. #!/usr/bin/perl -wT # $Id: unppt.pl,v 1.1 2001/02/02 10:33:42 roam Exp $ # unppt - a trivial script to convert ppt(6)'s output back to ASCII. use strict; MAIN:{ my $line; # input line processed while (defined($line = <>)) { chomp $line; next unless $line =~ /^\|([ o]*)\.([ o]*)\|$/; $line = "$1$2"; $line =~ tr/ o/01/; print pack("B*", $line); } print "\n"; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message