Sos

Dear "expert",

I need to know the command syntax to get the last field of the line below using shell or awk.

MD5 ("P~04-05-2006~PROPAY_IFT~0662012000750PAY2~IFTTEST123~1000.23AMBB~0012010003406~~~~~~~~~~~~~~~~~~~A1234567890B1234567890C1234567890~D1234567890E1234567890F1234567890~G1234567890H1234567890") = 0616f08fec37ebf30c1e87cb26e6b200

I expect to have the answer as below
0616f08fec37ebf30c1e87cb26e6b200

Many thanks.

This should work

awk -F"= " '{print $2}' filename

I have tried the AWK script and managed to receive the answer. Thanks.

I would like to find out how to eliminate the left most column which have a space there.

Use the 'tr' command.

awk -F"= " '{print $2}' filename | tr -d '[:space:]'

The [:space:] will remove any whitespace characters from the line. If you just want to remove ' ' (space) chars, run "tr -d ' '"

Many thanks to you all!!

THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...
THANK YOU...THANK YOU...THANK YOU...THANK YOU...THANK YOU...