Hi All,

I'm going crazy with this. I have a file called unique.txt with allot of values in. When I run my script it will add 1 value (1319613308.476855) to my value file but when I grep the value it displays nothing and I know the value is present in my Full_* file.

What can the problem be?

#!/bin/bash

echo "Filtering the Data"
echo ""
sleep 2

for uniqueValue in $(cat unique.txt);do
        echo $uniqueValue > value
        echo "Starting new Query"
        echo $uniqueValue
        cat value | xargs -i /bin/grep {} Full_*
        sleep 2

                echo ""
done

Regards

Recommended Answers

All 3 Replies

Any reason you are not just using grep $uniqueValue Full_* ?

Any reason you are not just using grep $uniqueValue Full_* ?

Hi L7Sqr,

I tried it with grep $uniqueValue Full_* but it gave the same output (nothing), I ended up posting what I had put together. When I do an echo 123456789.12334 > value and then run my cat value | xargs -i grep {} Full_* I get output but not always.

Any suggestions?

Regards

Hi Everyone,

I managed to get a solution. Instead of using cat I'm using strings strings value | xargs -i grep {} Full_* Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.