Skip to content
Advertisement

Can someone help me with rename tool? [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 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

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

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

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

Advertisement