Skip to content

How to paste a custom linux stdout into a JSON with Python?

I’m a beginner in Python and I’m trying to write a script that will take in a unix stdout file and convert it into a JSON format file. The format of the file is the following on every line: The path can contain whitespaces and backslash characters, an example is: Now my problem is that if I use th…

epoll: must I use multi-threading

I’ve got a basic knowledge from here about epoll. I know that epoll can monitor multiple FDs and handle them. My question is: can a heavy event block the server so I must use multithreading? For example, the epoll of a server is monitoring 2 sockets A and B. Now A starts to send lot of messages to the s…

Linux layer on macOS [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …

How to find a postion of the lowest value in the file?

How to output position of a line with the lowest value inside? I have a file with data like below: I need to find a lowest value from the last column and return its position Answer You can use this command in order to get only the line number where the value is shown(if the value appears more than one

Bash parse output in route command

I am writing a bash script to register the remote hosts in a wireless network. I am getting the remote IPs, but I need help to parse the output. Here’s my output: I need to get these IPs and insert into a command like … <remote_ip_1> … How can it be done? I couldn’t find this cas…