Prefix a string to the contents of a file

Hi all,

I have a requirement where in i have to create a temporary file by prefixing a string of special characters to each row of a input file.

the input file is '|' delimited.

here is the content of input file
aaa|1234|axad|123
bbb|qwqw|qw|1334

the output should be

###|aaa|1234|axad|123
###|bbb|qwqw|qw|1334

i know how to do this using sed..but i just want to evaluate the options using awk. also i would like to know which one will be more performance effective if i have to process files containing 2-3 million records.

I am using K-shell.

Thanks,
Narendar

time awk ' $0="###|" $0' inputfile
time sed 's/^.*$/###|&/' inputfile

time each one.

thank you for the response!!...
but i have to write the data to another file which might add up to
some more time.

also any idea on how to redirect the output of the awk to another
file??

Thanks,
Narendar

time awk ' $0="###|" $0' inputfile > newfile
time sed 's/^.*$/###|&/' inputfile > newfile

U can try this also!!!!!!!!!!!

awk '{print("###|",$0)}' filename > newfile

Cheers

Maybe you can explain why we need the parenthesis and comma?