10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to create a cronjob that will run on startup that will look at a list.txt file to see if there is a later version of a database using database.txt as the source. The matching lines are written to output.
$1 in database.txt will be in list.txt as a partial match. $2 of database.txt... (2 Replies)
Discussion started by: cmccabe
2 Replies
2. Shell Programming and Scripting
Hi All,
My Input file contains a 1000’s of lines in which I have to replace a
a string to the other. Here the problem is, I have the lines in my Input as below.
Cable Yes && !Pay TV && !ADS
\noUE \Label="Cable Yes && !Pay TV && !ADS"
I want to replace exactly the string Cable Yes &&... (37 Replies)
Discussion started by: am24
37 Replies
3. Shell Programming and Scripting
Hello,
I am writing a script in awk where I need to match a whole word that is stored inside a variable.
For example:
I am working on a text that looks like this, and I want to print the second row:
sfasfsomethingsfasf
this is something I can use
this is not somethingIcanuse
... (12 Replies)
Discussion started by: avi.levi
12 Replies
4. Shell Programming and Scripting
I want to match exact string stored in Variable INO and print next two lines. I have written below code which partially matches:
awk '/\'$VAR'/{getline; getline; print}'
Will be thankful , if somebody can help in to resolve this problem.
Please view this code tag video for how to use... (9 Replies)
Discussion started by: nitj
9 Replies
5. Shell Programming and Scripting
Hi friends,
i am using the following grep command for exact word match:
>echo "sachin#tendulkar" | grep -iw "sachin"
output: sachin#tendulkar
as we can see in the above example that its throwinng the exact match(which is not the case as the keyword is sachin and string is... (6 Replies)
Discussion started by: neelmani
6 Replies
6. UNIX for Dummies Questions & Answers
I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL.
I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies
7. Shell Programming and Scripting
I am trying to match a pattern exactly in a shell script. I have tried two methods
awk '/\<mpath${CURR_MP}\>/{print $1 $2}' multipath
perl -ne '/\bmpath${CURR_MP}\b/ and print' /var/tmp/multipath
Both these methods require that I use the escape character. I am guessing that is why... (8 Replies)
Discussion started by: bash_in_my_head
8 Replies
8. Shell Programming and Scripting
I'm trying to find a exact word match but couldn't do it.
ABC
ABC_NE
Searching for ABC_NE tried
grep -w </ABC_NE/>
grep "^ABC_NE$"
but didn't worked , any awk variants would also help.
---------- Post updated at 08:40 AM ---------- Previous update was at 06:48 AM ----------
I... (2 Replies)
Discussion started by: dinjo_jo
2 Replies
9. UNIX for Dummies Questions & Answers
Hi all,
Is anyone able to help with the following query?
I have an input file with several lines of words, e.g.
"hellolaylahello"
"hellohellohellolayla"
I want to search for the exact string "hello" in each line and display:
2 "hellolaylahello"
3 "hellohellohellolayla"
I... (11 Replies)
Discussion started by: dr_sabz
11 Replies
10. Shell Programming and Scripting
Hi,
I have sentences like this:
$sent=
Protein modeling studies reveal that the RG-rich region is part of a three to four strand antiparallel beta-sheet, which in other RNA binding protein functions as a platform for nucleic acid interactions.
Heterogeneous nuclear ribonucleoparticle... (19 Replies)
Discussion started by: vanitham
19 Replies