fl command - set record length

Hi,

I have a KSH shell script running on hpux that uses the fl command - ex:

cat /foo | fl 50 > bar

This command will take each record in the file foo, make it 50 characters long and then write it to the file bar. my problem is that I am porting my scripts over to solaris which doesn't suport the 'fl' command.

Any ideas?

Thanks,

Tom

On my AIX box :

newform -l50 -a -b /foo > bar

and for all Unix with awk :

awk '{printf'"%-50.50s\n",$0)}' /foo > bar

Jean-Pierre.

Thanks !!!!!