2021年3月23日星期二

How to delete the first “text” the each line of the text

This is the first time I'm asking question there so I'm sorry if is there anything I did wrong

Consider a file names '00.txt' and It contains the following.

ai_00_01_01 word01 word01(translated)  ai_00_01_02 word02 word02(translated)    ...  ai_00_01_305 word305 word305(translated)  

P.S. (translated) doesn't mean there is really a () there, it is just a other language of that line's word

I hope it changed to this :

word01 = word01(translated)  word02 = word02(translated)    ...  word305 = word305(translated)  

The things I tried:

cut -f 2- -d ' ' 00.txt > new_file.txt  

"Give me the second and any other field beyond, using space as a delimiter, from the file.txt file and direct the output to new_file.txt" -by ivanivan in https://unix.stackexchange.com/questions/515249/how-to-delete-the-first-word-in-each-line-of-a-file (I think it's means it is delete the text until the first space?Bad English sorry)

The code I tried just generate a new txt file while nth inside, and the 00 txt file didn't change anything

Thanks to anyone to help this noob(aka myself)

https://stackoverflow.com/questions/66773701/how-to-delete-the-first-text-the-each-line-of-the-text March 24, 2021 at 09:56AM

没有评论:

发表评论