[ale] dd ascii conversion of binary data format

Steven A. Duchene sad at hpuerca.atl.hp.com
Fri Mar 22 12:39:18 EST 1996


I though this would be of interest to those folks who were discussing
(or perhaps just cussing :-) the issues with transfering binary data from
a Sun Solaris system to a Linux system.
> 
> >Hi,
> >
> >I have a customer trying to convert an EBCIDIC file on a tape to
> >ascii, and his record lengths are 1250. He also says that he has a
> >header in this file before the records starts and he is using mt command
> >to bypass it.
> >
> >I have tried the dd command:
> >  dd if=/dev/rmt/0m of=filename conv=ascii with ibs=1250 and obs=1250 or 
> >  diff variety, but we are not able to get the whole file copied.
> >  Any suggestions?
> 
> Try dd if=/dev/rmt/0m of=filename conv=ebcdic bs=1250
> 
> (dd is binary by default and doesn't naturally read ebcdic unless you tell
> it to...)
> 
> You *may* have to swap bytes (conv=swab) or even words (conv=swaw) if
> you're reading an IBM tape...
> 
> >-Sia
> >
> 


--
Steve DuChene              sad at hpuerca.atl.hp.com               1-800-633-3600

	       The HP North American Response Center, Atlanta
		   X/Vue/xterminal/graphics support team
    		    I am an employee of Hewlett-Packard.






More information about the Ale mailing list