File1:Dms 01.01.2015 feeder1 6kv close at 04:30  Updated  Dms 01.01.2015 feeder1 6kv open at 06:20  Updated  Dms 04.02.2015 feeder10 6kv close at 17:23  Updated  Dms 04.02.2015 feeder12 6kv open at 23:30  Updated  Dms 12.04.2015 feeder4 6kv disturb at 12:30  Updated  Dms 12.04.2015 feeder7 6kv close at 11:09  Updated  Dms 16.05.2015 feeder8 6kv open at 13:10  Updated  Dms 01.06.2015 feeder3 6kv close at 05:07  UpdatedOutput will be:Dms 01.01.2015 feeder1 6kv close at 04:30  Updated  Dms 01.01.2015 feeder1 6kv open at 06:20  Updated  Dms 04.02.2015 feeder10 6kv close at 17:23  Updated  Dms 04.02.2015 feeder12 6kv open at 23:30  Updated  Dms 12.04.2015 feeder4 6kv disturb at 12:30  Updated  Dms 12.04.2015 feeder7 6kv close at 11:09  Updated  Dms 16.05.2015 feeder8 6kv open at 13:10  Updated  Dms 01.06.2015 feeder3 6kv close at 05:07  EOFI want to change only the last Updated to EOF using command.Please be noted, my line numbers in file is not fixed. It may be 100 lines or may be 500 lines but I want to change only the last word using command.
How to find and replace only a particular word (which is at the end of the file) using shell command?
shell;text processing;sed;awk
With sed:sed -e '$s/Updated/EOF/' file