10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried:
grep -lr "this string" *
but I do not... (3 Replies)
Discussion started by: Circuits
2. Shell Programming and Scripting
Need your help for this scripting issue I have. I am not really good at this, so seeking your help.
I have a file looking similar to this:
Hello, i am human and name=ABCD.
How are you?
Hello, i am human and name=PQRS.
I am good.
Hello, i am human and name=ABCD.
Hello, i... (12 Replies)
Discussion started by: royzlife
3. Shell Programming and Scripting
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
Discussion started by: laknar
4. Shell Programming and Scripting
I'm looking for an awk or (preferably) sed solution to search a pipe delimited file for any occurrence of an email address that does not include a designed domain, and replace the email address with a blank. E.g.
... (2 Replies)
Discussion started by: tiggyboo
5. Shell Programming and Scripting
Let me give you a complete example what I am trying to achieve.
1. Below is the log file structure where I need 2,5 and 14th column of the logs after grepping through the linkId=1ddoic.
Log file structure:-
abc.com 20120829001415 127.0.0.1 app none11111 sas 0 0 N clk Mozilla/5.0... (3 Replies)
Discussion started by: kmajumder
6. Shell Programming and Scripting
I have a list of files with different filenames like nam0001.txt,pan0001.txt etc coming in /data/inbox from various places.
I needed a shell script which would:-
1)searches for a word from the filenames (coming in inbox directory) provided in input parameter.
2)if found, put in... (2 Replies)
Discussion started by: Saiesh
7. Shell Programming and Scripting
I want to perform a conditional search and remove my search string.
Input string: "abcdaabcadgfaarstab"
Character to search: "a"
Condition: Remove all "a" in the input string except if it is "aa"
Output string: "bcdaabcdgfaarstb"
Can you please help me in this? (5 Replies)
Discussion started by: dominiclajs
8. Shell Programming and Scripting
I need to print fileNames that contains multiple search strings conditionally.
Condition: Any file in the folder that has search strings
---> (b1b && d1d) && ( a1a || c1c ).
i.e File should have both (b1b AND d1d) AND (either a1a or c1c).
Where && is logical AND
|| is logical OR.
... (10 Replies)
Discussion started by: kchinnam
9. Shell Programming and Scripting
I appreciate the enormous amount of knowledge that flows in this forum.
I am an average UNIX user. I have many files with lines like the below. I have separated each line with space for ease of reading. I need to replace the first occurance of "/00" with null on those lines that have... (6 Replies)
Discussion started by: Nanu_Manju
10. Shell Programming and Scripting
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto