Search Results

Search: Posts Made By: nezabudka
59,290
Posted By apmcd47
Try appending this to your command: 2>...
Try appending this to your command:


2> >(grep -v 'No such file or directory' >&2)
It should remove the above message from the STDERR but allow other messages to be printed.


Works for bash...
98,429
Posted By bedtime
I've attached the results. None of the subtitles...
I've attached the results. None of the subtitles seemed to translate properly. At least with me. I made sure to get rid of the '\r' on each .srt file with your code.


All the above files worked...
98,429
Posted By bedtime
I'm going to give it a try tomorrow when I can...
I'm going to give it a try tomorrow when I can dedicate more time to it. Thank you so much! :)


Updated:


user@localhost:~$ seq -f'(%.f)' 5
(1)
(2)
(3)
(4)
(5)With:
echo...
40,495
Posted By RudiC
Try this adaption of nezabudka's proposal to...
Try this adaption of nezabudka's proposal to support both structures:
sed -n '/DISTINCT/,/quit/{s/^.*: //; p}' file, or try also

awk '/202[0-9 :,-]*/ {sub ("^.*" $9, "")} /SELECT/, /quit/' file
Forum: What is on Your Mind? 04-04-2020
17,184
Posted By Neo
According to a quick check 35 tables (posts with...
According to a quick check 35 tables (posts with tables) has been stripped or skipped from the migration:


MariaDB [vb3]> select count(postid) from post where pagetext like '%[table="head"]%';...
44,016
Posted By sea
Oh dang, guess I cant just copy paste the...
Oh dang, guess I cant just copy paste the argument handling from the previous files...

Figured:


Guess this is this kind of an unspecified behaviour...
Welp, guess I'll need to work around...
Forum: What is on Your Mind? 04-02-2020
17,184
Posted By Neo
Today, armed with a new migration script...
Today, armed with a new migration script vbulletin_neo7.rb I will start a migration from scratch on the staging server for the purposes of getting raw preprocessed posts from the postgres DB and...
98,429
Posted By bedtime
You are the first to run the script. Thank you!...
You are the first to run the script. Thank you! :o


Good point. And thank you so much for looking at my script.

Here is the issue with sending Google big chucks to translate: My first program...
98,429
Posted By bedtime
It's a great program, but I prefer my program to...
It's a great program, but I prefer my program to be independent. Most people don't want to have to install a script plus another program. Many are shy of scripts to begin with. My program does it all...
98,429
Posted By bedtime
Thank you for posting that code. I tried it, but...
Thank you for posting that code. I tried it, but it didn't have any effect. The code is more complex. The program takes the output of Google Translate and sifts through a bunch of garbage to find the...
Forum: Programming 03-26-2020
20,672
Posted By Neo
Ruby-bbcode-to-md gem is a code mangler
Warning to Users of the Ruby gem ruby-bbcode-to-md

The Discourse plugin ruby-bbcode-to-md maintained by Neil Lalonde on GitHub (https://github.com/nlalonde/ruby-bbcode-to-md) is a total code...
38,084
Posted By Chubler_XL
Nice procedure nezabudka, but original request...
Nice procedure nezabudka, but original request was selection of item by number or by name:



For a higher level of difficulty how about spaces in the options:

#!/bin/bash
listofitems="fried...
2,852
Posted By MadeInGermany
The previous post is only for GNU sed that is...
The previous post is only for GNU sed that is compiled with a recent glibc that has got the \S \s from perl (PCRE (https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions)).
If you want...
Forum: What is on Your Mind? 03-15-2020
23,173
Posted By Neo
Moving right along..... no apparent errors in...
Moving right along..... no apparent errors in the modifications included in the Ruby migration script, vbulletin_neo4.rb :

importing groups..
20 / 20 (100.0%) [49738 items/min] ...
2,828
Posted By RudiC
Or awk -F, ' {print $0 FS...
Or
awk -F, '
{print $0 FS substr($NF,($3=="bcd") ? 4 : 9, 1)}
' file
Forum: Programming 03-12-2020
12,818
Posted By RavinderSingh13
Hello Neo/All, Very glad to tell you that...
Hello Neo/All,

Very glad to tell you that after getting inspired from Neo I have build my own very first Bot in Telegram + NR + shell + python(a bit) + JS suit as of now.

Following is its...
2,828
Posted By Scrutinizer
Try: awk -F, '$3=="bcd"{$0=$0 FS...
Try:
awk -F, '$3=="bcd"{$0=$0 FS substr($NF,4,1)}1' file
2,828
Posted By RudiC
@nezabudka: You are right if the last field is...
@nezabudka: You are right if the last field is well-formed, i.e. >= 4 chars. Compare the versions for the case of last field < 4 char...
Forum: What is on Your Mind? 03-10-2020
19,479
Posted By Neo
Still moving along: 463672 / 651396 (...
Still moving along:

463672 / 651396 ( 71.2%) [579 items/min]

The only "cautionary" comment I have so far is that of the two people on the "discourse side of the house" I have interacted...
2,828
Posted By RudiC
And, the .* would allow for one or more...
And, the .* would allow for one or more comma-separated fields, both in the middle as well as at line end. You might want to anchor the regex at line end, too. Proposal (untested)


sed -r...
2,828
Posted By wisecracker
The usual questions: Which OS are you...
The usual questions:


Which OS are you using?
What are your preferred tools/utilities/shells/languages?


And most of all what have you tried?
5,514
Posted By RudiC
The OP specified , that's what the formatted...
The OP specified , that's what the formatted sprintf is for. As the sample data are just 10 byte long, not 12, we need to wait until resolved by the OP, we can just guess. Try this simplified but...
5,514
Posted By RudiC
Adapting nezabudka's proposal, (untested): ...
Adapting nezabudka's proposal, (untested):


awk '
NR==FNR {pat[$1] = $2
next
}

{$0 = substr ($0, 1, 133) sprintf ("%12s", pat[substr ($0, 134, 12)])...
5,514
Posted By pchang
Hi nezabudka. This is an external file that...
Hi nezabudka.

This is an external file that we receive from a third party vendor and there's no guarantee that we will always have a space in between the fields (so NF-4 might not always work...
Forum: What is on Your Mind? 03-09-2020
19,479
Posted By Neo
Currently chugging along, importing users sans...
Currently chugging along, importing users sans avatars and passwords.

root@localhost-app:/var/www/discourse# su discourse -c 'bundle exec ruby script/import_scripts/vbulletin.rb'...
Showing results 1 to 25 of 359

 
All times are GMT -4. The time now is 09:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy