I want to delete the 5th word of each line in a file.The current content of the file:File is not updated or and will be removed  System will shut down f within 10 seconds  Please save your work 55 or copy to other location  Kindly cooperate with us D  Expected output:File is not updated and will be removed  System will shut down within 10 seconds  Please save your work or copy to other location  Kindly cooperate with us
How can I delete the 5th word of every line in a file?
text processing;sed;awk
How about cut :$ cut -d' ' -f1-4,6- file.txt File is not updated and will be removed  System will shut down within 10 seconds  Please save your work or copy to other location  Kindly cooperate with us-d' ' sets the delimiter as space-f1-4,6- selects the first to 4th field (word), leaving the 5th one and then continue printing from 6th to the rest.