convert a pipe delimited file to a':" delimited file

i have a file whose data is like this::
osr_pe_assign|-120|wg000d@att.com|4|
osr_evt|-21|wg000d@att.com|4|
pe_avail|-21|wg000d@att.com|4|
osr_svt|-11|wg000d@att.com|4|
pe_mop|-13|wg000d@att.com|4|
instar_ready|-35|wg000d@att.com|4|
nsdnet_ready|-90|wg000d@att.com|4|
osr_nvt|-1|wg000d@att.com|4|
port_ip_assignment|-35|wg000d@att.com|4|

i want to convert this pipe delimited file to ":" delimited file in such a way that the there is no colon at the end of each row.

plzzzz help
urgent

sed 's |$  ;s | : g' infile

if you have Python

python -c "print '\n'.join([line.strip()[:-1].replace('|',':') for line in open('file')])"

it is showing :s not found

Could you post (copy/paste) the exact command and (error) messages from your terminal?

its working thatnks a alot addict............:smiley:

Or if you have perl:

perl -ne '{s/\|$//; s/\|/~/g; print}' <file_name>

tyler_durden