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 Exchange site, you can leave a comment to explain where the question
Nested bash loop runs but logic is not correct
I have this nested bash for loop where the first loop represents the range of servers, and the second loop reads each lines of the .txt file. Then will do a zgrep -i and find for a string on the matching line. keys.txt is as follow: Bash Loops: This runs but its logging every instance where ‘InitialRequest’ is defined. What
Is it possible to add a customized name for the (non file-backed) mmap region?
Just curious whether it is possible to specify a name for the non file-backed mmap region? Some thing like the [New VMA area] in the following example: Answer The content of maps comes from the show_map_vma function in fs/proc/task_mmu.c. Looking at it, if you want a custom name for a non-file-backed mapping, it’d need to come from either vma->vm_ops->name or
How to use regex to match both filename and file content in Linux? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I want to find files that contain the word ‘virus’ but not ‘antivirus’ (case insensitive) in both their filename and their content. Thanks for your
Regex match with capturing group excluding specific characters and looking for the last occurrence based on later characters
I apologize beforehand for the jumbled mess that is the title but that’s the shortest way I could think to describe what I’m trying to do. I’m reading a file that has multiple lines of text that I’m looping through and I’m trying to use regex to get a substring from each line. These lines will start with the word
How to check password on macOS?
The following C program can check the password of a user on Linux. But it does not work on macOS because some functions are Linux specific. Could anybody show me how to revise the program so that it works on macOS? Answer Both Linux and macOS use PAM for authentication; Linux uses Linux-PAM, and MacOS and BSDs OpenPAM. To authenticate
MongoDB ops manager “java.lang.OutOfMemoryError: unable to create native thread”
Im currently setting up a new MongoDB ops manager machine. Installation works fine but I can’t start the mongodb-mms service. The starting of Instance 0 fails with an java.lang.OutOfMemoryError exception. I use the same configuration as on my test server (2 CPU cores, 8gb ram), there the service starts without any interrupt. Changing the ulimit configuration / starting the service
waitpid() function returns ERROR (-1), why?
I’m writing a Linux shell-like program in C. Among others, I’m implementing two built-in commands: jobs, history. In jobs, I print the list of currently working commands (in the background). In history I print the list of all commands history until now, specifying for each command if it’s RUNNING or DONE. To implement the two, my idea was to have
Parse From Text File into String output
So I have a text file called employees.txt that looks like this… I’m trying to write a sed script that will read in the text file then output it in the format “< name > is a < gender >, and is < age > years old now.” I know I need to set the IFS=, but I’m stuck on
Failed to start ngnix.service: Unit ngnix.service not found
I have installed ngnix on ubuntu 20.04 . But when i am giving command sudo systemctl start ngnix . I am facing an error Failed to start ngnix.service: Unit ngnix.service not found. Please help me out through this problem. Answer It’s called nginx, not ngnix. So you need to start it as sudo systemctl start nginx (note the spelling).