To "chop" your file in Unix use:
fold -w291 in-file > out-file.
Your awk statement has the following errors:
1. The "-F" flag is used to indicate the field separator character. For
example: awk -F@ '{...}' 2. The correct syntax of the printf() function is
printf("%291s\n",$0) 3. Such statement would extract the first 291 characters
of each line of your input file, and not "chop" it.
MK
In article <[log in to unmask]>,
Ken Winslet <[log in to unmask]> wrote:
> Does anyone out there know the command to split a file in the Unix world.
>
> I have a file and need to chop it up into 291 byte records.
>
> I tried this command but I get errors:
>
> awk -F '(printf("291%s\n",$0)' file2.dat>file2.dat
>
> any help would be great!!!!
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.