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
3 Replies
2. Shell Programming and Scripting
Some help please:
Need to find string ||(everything in front of it)B0300|| and replace it with ||0|| globally
In:
16112121||||0||0||0||0||0||52||52||0||0||0||0||1507200053342B0300||1507200053342B0300||0||0||0||0700
Out:
16112121||||0||0||0||0||0||52||52||0||0||0||0||0||0||0||0||0||0700
... (4 Replies)
Discussion started by: drbiloukos
4 Replies
3. Shell Programming and Scripting
Hi,
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.
Good bye.
Hello, i... (12 Replies)
Discussion started by: royzlife
12 Replies
4. 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.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
Discussion started by: laknar
5 Replies
5. Programming
Hi all,
I'm after some help with this small issue which i'm struggling to work out a fix for.
I have a file that contains records that all have a time stamp for each individual record, i need to search the file for a specific time stamp and then search back 10 seconds to see if the number... (2 Replies)
Discussion started by: sp3arsy
2 Replies
6. Shell Programming and Scripting
I'm new to Unix scripting and I'm not sure if this can be done. Example:
search (grep) in a file for 'Control ID' and then replace with 4 blanks 7 bytes before 'Control ID.
input
"xxxxxx1234xxxxxxxControl IDxxxxxx"
output:
"xxxxxx xxxxxxxControl IDxxxxxx"
thanks! (7 Replies)
Discussion started by: jbt828
7 Replies
7. Shell Programming and Scripting
Hello. I'm not nearly good enough with awk/perl to create the logfile scraping script that my boss is insisting we need immediately. Here is a brief 3-line excerpt from the access.log file in question (actual URL domain changed to 'aaa.com'):
209.253.130.36 - - "GET... (2 Replies)
Discussion started by: kevinmccallum
2 Replies
8. Shell Programming and Scripting
Hi,
I have to search for first occurenceof string str1 in a file(>5GB).
Now, after I have that , I have to search backwards from that offset till I get another string str2. I should also be able to get the
new string str2's offset.
Similarly, I look for last occurence of str1 and then... (1 Reply)
Discussion started by: finder255
1 Replies
9. Shell Programming and Scripting
Hi,
I have a variable , lets say
a=/disk1/net/first.ksh
i need to grep "first.ksh"
everytime "a" gets changed dynamically and i do not know how many '"/" are there in my variable.
Can somebody help me out. (9 Replies)
Discussion started by: giri_luck
9 Replies
10. Shell Programming and Scripting
Hi All,
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
4 Replies