Cut lines before keyword

Hi,
How to cut all lines in file before keyword?

from
1 2333214 word ...... some text
2 234343 234234 word ...... some text
3 234324 324 3234 word ...... some text

to
1 2333214
2 234343 234234
3 234324 324 3234

echo '3 234324 324 3234 word ...... some text' | sed 's#word.*##'

thnx :slight_smile:

echo "1 2333214 word ...... some text" | sed 's/word.*$//'
# while read line;do echo ${line%%word*};done < file
1 2333214
2 234343 234234
3 234324 324 3234