10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I hope somebody would be able to help me.
I would need to search a string coming from a file, example file.txt:
dog
cat
goat
horse
fish
For every string, I would need to know if there are any files inside a directory(recursively) that contains the string regardless of case.... (9 Replies)
Discussion started by: kokoro
9 Replies
2. Shell Programming and Scripting
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Discussion started by: An0mander
2 Replies
3. Shell Programming and Scripting
Hi,
I need someone's help in writing correct perl code.
I implemented following code for "multiple search strings replaced with single string".
=========================================================
#!/usr/bin/perl
my $searchStr = 'register_inst\.write_t\(' |... (2 Replies)
Discussion started by: chettyravi
2 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. Shell Programming and Scripting
I have a file with
<suit:run date="Trump Tue 06/19/2012 11:41 AM EDT" machine="garg-ln" build="19921" level="beta" release="6.1.5" os="Linux">
Need to find word "build" then
extract build number, which is 19921 also
release number, which is 6.1.5 then
concatenate them to one variable as... (6 Replies)
Discussion started by: garg
6 Replies
6. Shell Programming and Scripting
What's the easiest way to search a file for a specific string and then look for other instances after that? I want to search for all Virtual Hosts and print out the Server Name and Document Root (if it has that info), while discarding the rest of the info.
Basically my file looks like this:
...... (6 Replies)
Discussion started by: Mbohmer
6 Replies
7. Solaris
File name : Sample.txt
<ownername>Oracle< ownername>
I am new to unix world , i would like to search string and return back to another sh script.
bascially i want to read file Sample.txt find the string between <ownername> Sample.txt < ownername> .
Gerneric way to find the string... (15 Replies)
Discussion started by: balajikalai
15 Replies
8. Shell Programming and Scripting
If i wanted to search for two strings that are on lines in the log, how do I do it?
The following code searches for just one string that is one one line.
awk '/^/ {split($2,s,",");a=$1 FS s} /failure agaf@fafa/ {b=a} END{print b}' urfile
What if I wanted to search for "failure agaf@fafa"... (3 Replies)
Discussion started by: SkySmart
3 Replies
9. Shell Programming and Scripting
I tried awk for this, but failed <or my code is not correct? I dont know>. Can anyone help me on this?
---------- Post updated at 08:34 PM ---------- Previous update was at 08:29 PM ----------
my working file looks like this:
<empty>
<empty>
<empty>
NAME :ABC AGE :15
GENDER... (6 Replies)
Discussion started by: kingpeejay
6 Replies
10. Shell Programming and Scripting
Hi All,
I have files:
1. abc.sql
'This is a sample file for testing'
This does not have quotations
this also does not have quotations.
and this 'has quotations'.
here I need to list the hard coded strings 'This is a sample file for testing' and
'has quotations'.
So i have... (13 Replies)
Discussion started by: kprattip
13 Replies