I would like to delete the last string from a Linux/Unix variable containing multiple strings with space separation -
strings='Y NULL NULL NULL NULL NULL 20210607 NULL NULL NULL NULL NULL NULL EXCEL'
I want to delete the last string i.e. EXCEL
Expected Output -
Y NULL NULL NULL NULL NULL 20210607 NULL NULL NULL NULL NULL NULL
Other Input Set -
str1='RUB 20210607 SPREAD'
str2='RUSSIA NULL NULL NULL 20210607 Y Y Y N N Y Y HTML'
str3='LONDON NULL NULL NULL 20210607 Y Y Y N N Y Y CSV'
PS - Here string is trailing sequence of non-space characters.