Telegram Group & Telegram Channel
replace srt / vrt index numbers in subtitles...not really needed. In VSCode can simply do search for (^\d+\n) and replace (nothing) ...but to do in a script is much harder it appears. Here's what I found after lots of searching.

This one removes the number starting at beginning of a line and appends a newline but that creates two newlines (two empty lines)
sed -i 'N;s|^[0-9]\+||' test.vtt

Now to search for two empty lines and just remove one of them.

sed -i '/^$/{ :l N; s/^\n$//; t l p; d; }' test.vtt

So I guess I'll just stick with the first method.

sed -i 'N;s|^[0-9]\+||' test.vtt

So it went from 4.4MB down to 4.3MB so hmmm maybe not that much of a difference. Ok just did another one it went from 7.4MB to 6.8MB ..so it's a bit.



tg-me.com/geektips/875
Create:
Last Update:

replace srt / vrt index numbers in subtitles...not really needed. In VSCode can simply do search for (^\d+\n) and replace (nothing) ...but to do in a script is much harder it appears. Here's what I found after lots of searching.

This one removes the number starting at beginning of a line and appends a newline but that creates two newlines (two empty lines)
sed -i 'N;s|^[0-9]\+||' test.vtt

Now to search for two empty lines and just remove one of them.

sed -i '/^$/{ :l N; s/^\n$//; t l p; d; }' test.vtt

So I guess I'll just stick with the first method.

sed -i 'N;s|^[0-9]\+||' test.vtt

So it went from 4.4MB down to 4.3MB so hmmm maybe not that much of a difference. Ok just did another one it went from 7.4MB to 6.8MB ..so it's a bit.

BY GeekTips





Share with your friend now:
tg-me.com/geektips/875

View MORE
Open in Telegram


GeekTips Telegram | DID YOU KNOW?

Date: |

Dump Scam in Leaked Telegram Chat

A leaked Telegram discussion by 50 so-called crypto influencers has exposed the extraordinary steps they take in order to profit on the back off unsuspecting defi investors. According to a leaked screenshot of the chat, an elaborate plan to defraud defi investors using the worthless “$Few” tokens had been hatched. $Few tokens would be airdropped to some of the influencers who in turn promoted these to unsuspecting followers on Twitter.

The Singapore stock market has alternated between positive and negative finishes through the last five trading days since the end of the two-day winning streak in which it had added more than a dozen points or 0.4 percent. The Straits Times Index now sits just above the 3,060-point plateau and it's likely to see a narrow trading range on Monday.

GeekTips from us


Telegram GeekTips
FROM USA