1 Jul 2022 |
jbara | when trying to lookup what I need online, I felt like there must be some interactive question and answer type of game with awk | 09:07:14 |
jbara | the way there is for a lot of programming languages | 09:07:30 |
jbara | does anybody know any ? | 09:07:39 |
jbara | or something that can be useful ? | 09:08:38 |
jbara | ps: as for my problem, I know that I can do awk '/something/{print $n}' or awk 'END{print $n}' but I need to combine them (to get the last line of those who match my regex) without having to pipe the result into another awk (I don't really need it btw, but just for learning related purposes) | 09:10:01 |
jbara | I often hear that the best practice when making scripts is to have the least possible number of pipes whenever possible | 09:12:06 |
jbara | * ps: as for my problem, I know that I can do awk '/something/{print $n}' or awk 'END{print $n}' (identical to tail -n1 ) but I need to combine them (to get the last line of those who match my regex) without having to pipe the result into another awk (I don't really need it btw, but just for learning related purposes) | 09:12:45 |
NRK | jbara: does this do what you want? awk '/1/ {z=$0}; END{print z}' | 09:35:55 |
NRK | well, change /1/ to whatever else ofc. | 09:36:25 |
jbara | perfect, thank you. | 09:48:17 |
| @real_black_sheep:matrix.org joined the room. | 10:02:15 |
| @real_black_sheep:matrix.org left the room. | 10:04:01 |
jbara | have anybody ever had a problem on sway where all programs just stop reciving keyboard input but sway itself still works ? (I had it a couple of times before, and it's kind of annoying when you can't close it because you're waiting for an emerge to complete) | 10:29:51 |
parona | is it just keyboard input which stops working? | 10:30:52 |
parona | like does the mouse suffer as well | 10:31:01 |
jbara | I'm on i3 on tty2 now though, but I wonder if there's something I can do without actually closing sway (it happens rarely, but when it does, it's always a bad time. I think it only happened when I'm compiling) | 10:31:08 |
jbara | the mouse works fine | 10:31:12 |
jbara | I can click on things in my browser | 10:31:19 |
jbara | and all | 10:31:22 |
parona | and its not slower than usual? | 10:31:31 |
jbara | nope | 10:31:41 |
jbara | I can even open a new terminal using super+enter | 10:31:53 |
jbara | but I can't write anything in it | 10:32:00 |
jbara | the cursor seems out of focus | 10:32:09 |
jbara | (the way it looks when you have to click it so it's focused) but clicking doesn't change anything | 10:32:28 |
jbara | anybody knows a command line program that uploads an image so I can send a link ? | 10:34:33 |
jbara | kind of like wgetpaste or termbin | 10:36:40 |
jbara | In reply to @jbara:matrix.org the cursor seems out of focus I spent some time on tty2 , when I got back I found that the problem was solved by itself | 10:38:11 |
jbara | :3 | 10:38:13 |
| Rimuru changed their profile picture. | 11:06:47 |