Grep hangs


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Grep hangs
# 1  
Old 09-01-2006
Grep hangs

Running it on SunOS 5.9 Generic_117171-09 sun4u sparc SUNW,Sun-Fire-V440
The grep will hang if ERRORS.txt file > 100 lines

Thanks Smilie


ERRORS=./ERRORS.txt
EXCLUDEERRORFILE=./excludeERR.txt

cat $ERRORS | while read ERROR_LINE
do
echo +++ $ERROR_LINE
cat $EXCLUDEERRORFILE | while read EXCLUDE_LINE
do
EXCLUDE_LINE=1
print $ERROR_LINE |grep "$EXCLUDE_LINE"
continue 2
done
echo here
done
# 2  
Old 09-01-2006
EXCLUDE_LINE=1 I put in just for testing
# 3  
Old 09-04-2006
I have found a work around using awk instead cat to read the file. A little awkward but worked for me.
Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Xrdp hangs

Hi, I'm trying to get xrdp to work. I installed xrdp 0.5.0 from EPEL and the Desktop group. Now I can connect to the server with rdesktop, but I can't do any input... there is an authentication window asking the root password "to set the network proxy used for downloading packages" and I can't... (0 Replies)
Discussion started by: FrankVanDamme
0 Replies

2. Solaris

Server Hangs

I have a Sun-Fire-V210, the Server hangs for sometime and evn console wont be abled to access and after sometime the server comes back active. the messages file shows this , whats causing this ? # tail -500 messages Jan 25 07:02:16 xxxxxxxxxxxxx Corrupt label; wrong magic number Jan 25... (2 Replies)
Discussion started by: Sojourner
2 Replies

3. Shell Programming and Scripting

SFTP HANGS

Hi , we are writing a shell script to test connection of our destination servers and facing an issue if the destination server doesnt respond. we are using the following command., sftp -B /dev/fd/0 <host@servername> << EOF >> file.txt quit EOF --------- The above command hangs for 20min and... (0 Replies)
Discussion started by: mohanpadamata
0 Replies

4. Solaris

Explorer hangs

Hi Guys, Anyone encontered a problem where when you run your SUN explorer, it hangs at sysconfig? I am having this problem for some of my servers. rgds, (1 Reply)
Discussion started by: ronny_nch
1 Replies

5. UNIX for Dummies Questions & Answers

grep hangs for unquoted string

Guys, This weird problem popped out last week when I grepped for a certain unquoted string in a file, instead of listing all the matches, it just hangs. Here is the exact grep command: $> grep odt01758 LogFile But when I quote the grep pattern, it successfully prints out the matches: $>... (2 Replies)
Discussion started by: rainier
2 Replies

6. Shell Programming and Scripting

Script Hangs!

Hi, I have script which is based on TCL and expect. It is written to test my code. It usually runs fine for a while and hangs after sometime. Code snippet set l_temp_timeout $timeout OUTPUT_LOG2 2 >>>$expect_out(buffer)<<< OUTPUT_LOG2 2... (2 Replies)
Discussion started by: naveenpn
2 Replies

7. Red Hat

ls hangs on a directory

Running Red Hat Enterprise Linux Server release 5.1 (Tikanga) 2.6.18-53.el5 Trying to do an 'ls' of a sub-directory and the prompt never returns. Same problem running a find command as well. I have done an fsck on the file system (no problems) and can view other sub-directories on this... (5 Replies)
Discussion started by: wazzu62
5 Replies

8. AIX

HMC Hangs

Hi Gurus ; I have few SP Nodes running and alongwith that there is a console. All running Aix 4.3. The console system use to monitor activities for other SP nodes but at a sudden the console stops responding without logging any error. We have to reboot everytime sometimes twice or thrice in... (0 Replies)
Discussion started by: yadwendrav
0 Replies

9. AIX

AIX Hangs

Hai I am new to AIX, currently in our shop we use AIX 4.3.3 , where we have hosted the websphere 3.5 applicaiton on it. The AIX server is getting hanged very frequently, when analyse we found the swap memory is increasing once it reaches the memory 100 the system is totaly in hung state, so... (5 Replies)
Discussion started by: vipin77
5 Replies

10. Slackware

Fedora (C2) Hangs

Anyone else notice Fedora Core 2 (both 2.6.5 and .8 kernels) hang, specifically when running konqueror? I notice a lot of HD activity, but by the time I can switch to a shell to use top it's over. (1 Reply)
Discussion started by: Karma
1 Replies
Login or Register to Ask a Question