![]() ![]() Also, is it better to do "sed -e xxx -e xxx -e xxx" than doing "sed xxx | sed xxx | sed xxx" ? As in, is one necessarily faster than the other? I suppose you put those all together at the start so that those commands are run only once over the entire file instead of being run at every loop, is that correct?ģ. I had sed and tr at the start of the script, cleaning out the non-subtitle portions of the file, and then sed at the end replacing special characters. I do however ask, why is that better than dividing by 1000 and using the existing date command?Ģ. I understand function print_time is a simple method of calculating and printing the timestamps based on the milliseconds present in the original xml file. I wish to better understand your code, if you don't mind me asking MagicBanana.ġ. ![]() ![]() I am trying to hack my way through but I was thinking if there is some way to have awk count the whole words and make sure ALL of them are distributed in the lines (heuristically similarly to the original distribution) ? Basically if I have a 100 words in the original file and I want to replace them with 120, my code is not adding enough words per line to make it to the 120. I have not been able to fit a larger amount of text in the same number of lines. However, I was wrong in the calculation method. Where a is the starting point to print and b is the final point to print. I am still happy that I was able to at least work it out on my own anyway :)Īs for my other problem below, I did find a solution: Ahahah, I was quite sure my script wasn't the best possible solution, but I didn't expect such a large simplification to be possible. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |