Here is my test file test.txt
user1 ALL=(ALL) NOPASSWD: /usr/bin/* /app/tomcat/tomcat*/webapps/*, /usr/bin/rm -rf /app/tomcat/tomcat*/webapps/*,/bin/rm -rf /app/tomcat/tomcat*/webapps/**.sh , /...
I have two files.
(column separator is tab)
I am trying to grep the file1.txt against file2.txt sort of like this:...
I am running HP-UX 11.23 and have a bash script that reads two inputs.
Both inputs need to be exactly 6 digits long.
What is the best way to read the input and if its not 6 numbers
ask the users to ...
Having a thousand of data files (same extension) in a directory, how to delete those which contain a specific parameter statement?
For example, if I wented to delete all files containing the line
My apologizes... I have brain freeze and can't work through this.
I'm using sed and pattern space, but I keep deleting all occurrences of the lines containing the pattern.
I want to delete only the ...
I think I might have just searched wrong, but I didn't find any answer. If there's a duplicate, please just let me know, and I can take this down.
I'm using ack (link), which has ...
How would I get this output:
Found value: This order was placed for QT3000! OK?
Found value: This order was placed for QT300
Found value: 0
using line.txt and pattern.txt as below:
Any way to rysync only files which feature _custom.conf or even just custom or *.conf in the filename?
I've had a play with
rsync -am --include='custom' --include='*/' --exclude='*' /etc/asterisk ~/...
So I have a program (say, programA), that will give me an output, for example: yes, no, maybe, probably, possibly, impossible, banana.
I want to make a script that will do something, whatever it is, ...
I have a script that checks processes on our Linux servers.
An example would be we have a component named ebond-dbreader-bbg on server 1 and also a component named ebond-dbreader-bbg-cbrt on server 1....
I'm trying to use sed to find matching string on a line in a file on nth match.
I want to use expression to mach num and "anything" after on that line and replace it with num x.
I believe the title is self-explanatory.
I have some files given as parameters and the given string is the last parameter of my script.
I have tried the two scripts below and do not know how I could ...
Similar to, but not exactly like How to select first occurrence between two patterns including them... given this input file:
something P1 something
something P1 something
I am trying to replace positional arguments with variables in my bash script using Vim's substitute :scommand.
I would like to replace the following text in a bash script:
I have text report data formatted with an a identifier code on one line and then the account code associated with the identifier code on another line. Sometimes there are multiple account codes per ...
i have 2 text files: file1 contains only one column with a series of id values; file2 contains many columns. I need to check whether the values of file1 are contained in column2 of file2; the values ...
So guys have two files, both of them are tab-separated text files, trying to merge both the files based on two columns. The two files are unsorted and doesn't contain a header. Another thing is that ...
From one of our application logs that contains a bunch of INFO messages, and system out lines, I want to be able to extract lines that are contained within 2 patterns and then specifically get values ...