Sergiy Kolodyazhnyy

 Ask Ubuntu General Room

Normally: General discussion around Ask Ubuntu, Ubuntu & offic...
Apr 13, 2020 06:44
@Thayne Honestly, I've no idea or even remember what code I was working on - that was in 2017
Jan 1, 2020 07:17
@EliahKagan You, too ! Happy New Year !
Jan 1, 2020 07:17
```
>>> print([chr(i) for i in [72, 97, 112, 112, 121, 32, 78, 101, 119, 32, 89, 101, 97, 114, 32, 33]])
['H', 'a', 'p', 'p', 'y', ' ', 'N', 'e', 'w', ' ', 'Y', 'e', 'a', 'r', ' ', '!']
>>>
```
Dec 8, 2019 09:24
Ya'll be classy here
Dec 8, 2019 09:23
Alright , I'm out. I'll stop by some time again, but probably it'll be last one in a long while
Dec 8, 2019 09:07
Oh, that's good !!!
Dec 8, 2019 09:05
@Rinzwind still having sushi time to time ?
Dec 8, 2019 08:21
Been coding lately ?
Dec 8, 2019 07:59
I'm alright. Nothing particular.
Dec 8, 2019 07:44
how's everyone doing ?
Nov 29, 2019 10:41
Spent about 5 to 6 hours on it, and should probably get some rest now
 

  

Jan 1, 2020 07:19
```
>>> print([chr(i) for i in [72, 97, 112, 112, 121, 32, 78, 101, 119, 32, 89, 101, 97, 114, 32, 33]])
['H', 'a', 'p', 'p', 'y', ' ', 'N', 'e', 'w', ' ', 'Y', 'e', 'a', 'r', ' ', '!']
>>>
```
Dec 31, 2019 23:59
OK, I'll go AFK too for now
Dec 31, 2019 23:58
Nice ! Congrats !
Dec 31, 2019 23:57
And sort of took a step back from it, too
Dec 31, 2019 23:57
Lol, yes, I still have that bug , too. For me it's kinda "wontfix, delayed" type of status. Busy with other things.
Dec 31, 2019 23:54
Oh, and if you have cellphone, there's free terminal apps for Android, ssh clients , etc. I used to have some of those. Fun stuff. Although can be challenging typing on touch screen. But bluetooth keyboard solves that problem
Dec 31, 2019 23:52
In future I want to get one for my own home. Save on power that way.
Dec 31, 2019 23:52
Also that ^ Solar panel lamp. Can be useful
Dec 31, 2019 23:52
Well, do what you can, if you cannot work in terminal just make notes in a notebook, and practice when you do have chance
Dec 31, 2019 23:49
Yeah, it's a little hard to do networking and computing without electric power ^_^
Dec 31, 2019 23:47
Have you played with tcpdump yet ?
Dec 31, 2019 23:47
That's a good one, and yes that is still something very useful ! I've been kinda learning about networking myself, and also plan to learn more about it this year.
Dec 31, 2019 23:45
I used to also like the smell of fireworks around that time
Dec 31, 2019 23:43
applause.png
Dec 31, 2019 23:42
Depending on timezones, it is actually a new year in some places already.
Dec 31, 2019 23:41
Happy Incoming New Year !
Dec 31, 2019 23:41
@HenryWHHackv2.1.3 Hey, long time no see buddy !
 

 /dev/chat

General discussion for unix.stackexchange.com. If you have a q...
Dec 23, 2019 06:46
sorry, can't help myself make bad jokes here and there :) At least it's not fish puns . . . Then I'd be having a whale of a time with those
Dec 23, 2019 06:45
Also . . . that pinned link to "nice" is very . . . nice . . . .
Dec 23, 2019 06:44
Yep. Which is why I didn't post it there, but couldn't find an alternative either
Dec 23, 2019 06:41
Yep, they are. I recall browsing through some of them
Dec 23, 2019 06:33
Better:

dd conv=notrunc seek=$(wc -c < testFile.txt) bs=1 if=/etc/resolv.conf of=testFile.txt
Dec 23, 2019 06:31
I guess I answered my own question. Not portable enough, -b flag in du is missing from specs
Dec 23, 2019 06:28
Also, I feel like there should be a code-review SE site, but for command-line stuff
Dec 23, 2019 06:27
OK, so apparently oflag=append is not portable in dd. So here's a question: Is this good enough to be a portable alternative ?

dd conv=notrunc seek=$(du -b testFile.txt|cut -f1) bs=1 if=/etc/resolv.conf of=testFile.txt
Dec 19, 2019 09:08
Anyway, my curiosity has been satisfied. Thank you, Stephen !
Dec 19, 2019 09:06
So since POSIX is silent for that case , non-regular and no -r/-R flags, I'll leave reference to that off my answer
Dec 19, 2019 09:05
(For context, this answer askubuntu.com/a/698110/295286)
Dec 19, 2019 09:05
That's what I'd guess and initially added the O_TRUNC part to my answer, but then when I noticed the 4th part I was like wait a minute, something not right here
Dec 19, 2019 09:01
@StephenKitt Oh, d'oh. I knew I missed something. Thank you !
Dec 19, 2019 09:00
Oh, wait
Dec 19, 2019 09:00
MMmmm, popcorn
Dec 19, 2019 08:56
And for context, the /dev/null is supposed to be character crw-rw-rw- and according to POSIX definition if the source file type is not regular, dest_file should be created with the same file type. Unless I missed something, the nullfile.txt is supposed to be created as empty character device file as well.
Dec 19, 2019 08:51
Don't forget to put a try-catch block around that bus, though
Dec 19, 2019 08:50
Thank you !
Dec 19, 2019 08:49
Oh . . . So it does the same thing
Dec 19, 2019 08:49
There's some unPOSIXly shenanigans that I sense with GNU cp
Dec 19, 2019 08:48
@Kusalananda When you have a spare moment, do me a minor favor on your OpenBSD: post the output of cp /dev/null nullfile.txt ; ls -l nullfile.txt I've no BSD virtual machine ready and don't really want to download an iso just to test this