10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I would like to search for strings stored in searchstringfile.txt in inputfiles.
searchstringfile.txt
J./F.
Gls. Wal
F.
Towerinput1.txt
What is needed is J./F. 12 var Gls. Wal 16 interp. Tower 12 input2.txt
Awk shall search for F. 16 pt. J./F. 22 output.txt
input1.txt J./F. = 12 var... (3 Replies)
Discussion started by: sdf
3 Replies
2. Shell Programming and Scripting
Hi to all,
I have this input:
<group>
<x "2">Group D</x>
<x "3">Group B</x>
<x "1">Group A</x>
</group>
<group>
<x "1">Group E</x>
<x "0">Group B</x>
<x "1">Group C</x>
</group>
<group> ... (11 Replies)
Discussion started by: Ophiuchus
11 Replies
3. Shell Programming and Scripting
I have a file search_strings.txt filled with search strings which have a blank in between and look like this:
S. g. Erh.
o. J.
v. d. Chijs
g. Ehr.I would like to search the strings in the second given Textfile.txt and it shall return the column number.
Can anybody help with the correct... (3 Replies)
Discussion started by: sdf
3 Replies
4. Shell Programming and Scripting
Hi, i would really appreciate any help anyone can give with the following info.
Thanks in advance.
I need to run a search on a file that contains thousands of trades, each trade is added into the file in blocks of 25 lines. i know the search has to take place between a time stamp specified... (4 Replies)
Discussion started by: sp3arsy
4 Replies
5. 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
6. Shell Programming and Scripting
i have text files named like vho1.txt, vho2.txt... vho15.txt.In all there are 15 in number.
each file has strings like
\Movies On Demand\Action & Adventure|X-Men: Wolverine|2009-09-29 00:01:00|2010-03-24 23:59:00|Active|3
\Movies On Demand\Free\Free1|My movie 14|2010-01-11 00:00:00|2010-03-01... (5 Replies)
Discussion started by: ramse8pc
5 Replies
7. Shell Programming and Scripting
Hi, how do I match a particular element in a list and replace it with blank?
awk 'sub///' $FILE
list="AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA,
HI, ID, IL, IN, IA, KS, KY, LA, ME, MD,
MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ,
NM, NY, NC, ND, OH, OK, OR, PA, RI, SC,
SD, TN, TX, UT, VT, VA, WA,... (2 Replies)
Discussion started by: grossgermany
2 Replies
8. Shell Programming and Scripting
I've created an awk script that handles a varying number of search strings handed to it as command line parameters ($1 $2 etc). There may be 1, or 2 or 3 or more. A simplified version of the script is:
awk -v TYP="$1 $2 $3 $4 $5 $6" '
BEGIN {
CTYP = split (TYP,TYPP," ")
}
... (2 Replies)
Discussion started by: CarlosNC
2 Replies
9. Shell Programming and Scripting
Hello Friends,
Is it possible to return an array from a user defined function in awk ?
example:
gawk '
BEGIN{}
{
catch_line = my_function(i)
print catch_line
print catch_line
print catch_line
}
function my_function(i)
{
print "echo"
line= "awk"
line= "gawk"... (2 Replies)
Discussion started by: user_prady
2 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