Re: first 200 charactes of an EBCDIC file
From: Nick Landsberg (hukolau_at_NOSPAM.att.net)
Date: 03/11/04
- Previous message: Chris F.A. Johnson: "Re: Question - reading command line parms inside a script."
- In reply to: samuels_at_red.seas.upenn.edu: "Re: first 200 charactes of an EBCDIC file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 11 Mar 2004 00:12:54 GMT
samuels@red.seas.upenn.edu wrote:
> thanks.
> i tried this but it only gets the first 200 characters of the file, not of every record within the file.
> any other suggestions?
> -maurice
>
> Ken Andrews (gobble@degook.com) wrote:
> : <samuels@red.seas.upenn.edu> wrote in message
> : news:c2nffv$4qns$1@netnews.upenn.edu...
> : > hi,
> : > i have a ebcdic file that contains variable length records, is there any
> : unix command that i can use to take the first 200 characters of every
> : > record from the file and output them to another file? i'm thinking i can
> : use dd to do this but am not sure.
>
> : I don't have an EBCDIC file to test with, but at a WAG you might be able to
> : use "cut -c 1-200".
>
> : With "dd" you might go "cat source | dd conv=ascii | cut -c 1-200 > target"
>
>
It's been a LONG time since I've had to convert EDCBIC so some
of this may be off base.
The "cbs" parameter may be what you need to give to dd.
dd conv=ascii cbs=200 if=source of=target
No guarantees, but some old unused brain-cells clicked
on that one.
-- Ñ "It is impossible to make anything foolproof because fools are so ingenious" - A. Bloch
- Previous message: Chris F.A. Johnson: "Re: Question - reading command line parms inside a script."
- In reply to: samuels_at_red.seas.upenn.edu: "Re: first 200 charactes of an EBCDIC file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|