Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 4 y…
Get just an IP address only from `ipconfig` using native windows command
Let say this is an output of Windows ipconfig command. In Linux OS, I can easily get just an IP Address using grep and cut command. However, in Windows this is the best I can get using findstr command. Is there a way whereby we can cut just the IP portion out of this output? What I’m expecting is someth…
Linux bash to iterate over apache access_log files and send mail
I need a linux bash script which send me an email if any results appear in searches made in the apache logs. I have a very simple method (sentence) to look into SQL Injection attacks, which simply searches for some keywords used in SQLi. Is this: So now I would like to be able to launch it in several access_l…
Use a modified variable in bash script, trying to change git branch programatically
I’m playing around with my custom commands, and I’m currently trying to change a remote Git branch programatically using bash. The idea is this function will try to find the branch issue_X, if it does it switches, otherwise it creates and sets the remote origin. The problem is git branch -u origin…
Is there a way to retrieve the script path called by a user-defined command?
I’m a newbie in GNU/Linux and, for a project, I need to do some reverse engineering. At a given line in a script, there is a command: I’m almost sure the “dc” command was previously added to the path/simlink/(?) by a previous developper. When executed, the command allows to run a simul…
Use tar to archive the contents of your home directory in linux
I am trying to archive the contents of my home directory using tar and then compress the tar file with gzip. I know you can uncompress and unarchive the .tar.gz file using cat, tar and gzip. But , I don’t know how to compress and archive. Answer Hey there here is a link for your question. a full guide h…
Grep for String and open at the corresponding line
I’m having several occurrences of a specific string over several files in several lines obtained with grep. I’d like to open these files sequencially on the corresponding lines. I tried to do it with vim, but so far no success when it comes to open the line. Mustn’t be vim or grep, but IR…
389 Directory server testing with lib389
I am testing 389 Directory server testing with lib389. I am following the bellow link. https://fedorapeople.org/~spichugi/html/guidelines.html#add-modify-and-delete-operations What is the meaning of “standalone” here? Answer Its the name of ldap server instance:
Automate make execution with variable parameter
Here “SEED” means a random number: I will run the target test1 in terminal likewise. But the problem is here I want to run that target 10 times by using any conditional loops. If i want to run the test1 2nd time again I need to give like this: 3rd time: 4th time: Likewise, each and every time I ne…
Remove lines are between two line numbers (or patterns) with sed [no duplicate]
I saw and read many topics about my problem, but they didn’t help me. a close topic to my problem but it didn’t help me: removing lines between two patterns (not inclusive) with sed Question: I have a text file and I want to remove lines are between two patterns. note1: between these patterns, i d…