NATIO MARKET^345432534
+ COLUMBUS DISCOVERY in MORENAGO VESPUSSI^999921342
Gadappa'S F315^6716158190
+ SPEEDWAY 0533242 2332492 SPEEDWAY 0534234 352 KETNG CHQ24324435^9392493223
VILA ALINE VILLA ARR 24311605 9900961622^93294932
CHECK # 2193^99939249
online/phone xfr in fr acc 06500518267 date: 04-22-16 time: 11:14:32^45345334
mastermon bang on morena pa cucin new york ny xxxxxxxxxxxx0177^1232131
network printed workign jean pual dum ave long beac ny xxxxxxxxxxxx0177^1232131
master Bangalore petrol bunk metro 070-mt. v washingto dc xxxxxxxxxxxx0177^1232131
I want file1 string which has limited number of rows to be matched in file2 which has million rows and give me o/p with the count.
I tried below code but it takes lot of time and is not giving proper value in the o/p
Code:
Code:
file="/opt/sdp/.nikhil/PWD/beta.txt"
while read -r line; do
count=`grep -wi $line /opt/sdp/.nikhil/PWD/alpha.txt|wc -l`
echo $line "|" $count >> opfile.txt
done < "$file"
o/p i'm getting is incorrect as it is only having aline but it is incrementing the count to +1 in even ALINE BANG of my o/p as shown below which is incorrect similar case with bang on morena as well
Code:
Code:
ALINE | 1
ALINE BANG | 1
B ON A | 0
B.B.V.A. | 0
BANG AMER CORG | 1
BANG ON MORENA | 1
BANG ON MORENAIC | 1
BANG ON MORENAICA | 1
BANG ON MORENAICA CORP | 1
BANG ON MORENAICA N.A | 1
Dear unix users,
Any comments on this matter or not? I've been facing this kind of problem for very long. Thinking how to make my script move faster instead of using C to write it. I still prefer using Shell script.
Normally a FOR loop will make the script loop for very long time, what to do... (1 Reply)
I have been a SCO UNIX user, never an administrator...so I am stumbling around looking for information.
I don't know too much about what is onboard in terms of hardware, however; I will try my best.
We have SCO 5.07 and have applied MP5.
We have a quad core processor with 4 250 GB... (1 Reply)
Hello I have some nested loop to display files and form menu item.
The part of the code is below.
I found that after runnining the script for a while the display becomes very slow.
Does ksh shell provided any easy way to release variables, reinit, etc.
while ];do
script=0
... (2 Replies)
Dear All,
I am using the following script to find and replace the date format in a file. The field18 in the file has the following format: "01/26/2010 11:55:14 GMT+04:00" which I want to convert into the following format "20100126115514" for this purpose I am using the following lines of codes:... (5 Replies)
Hello everybody,
I have a little problem with one of my program. I made a plugin for collectd (a stats collector for my servers) but I have a problem to make it run in parallel.
My program gathers stats from logs, so it needs to run in background waiting for any new lines added in the log... (0 Replies)
Hello,
Hope you are doing fine. Let me describe the problem, I have a script that calls another script K2Test.sh, this script K2Test.sh (created by another team) takes date as argument and generates approx 1365 files in localcurves directory for given date.
Out of these 1365 I am only... (11 Replies)
Hi,
I want to read folders which do not have a file "processing" in a for loop ordered by timestamp.
Currently im doing like this.
Like
cd /home/working
for i in `ls -c1`
do
some command...
done
I want to exclude folders which have that "processing" file.
The directory... (2 Replies)
Hello,
I extracted a list of files in a directory with the command ls . However this is not my computer, so the ls functionality has been revamped so that it gives the filesizes in front like this :
This is the output of ls command : I stored the output in a file filelist
1.1M... (5 Replies)