Linux segmentation fault message

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: joe@actionline.com
Date:  
To: plug-discuss
Subject: Linux segmentation fault message

I have uploaded a small shell script and two related files to my Linux
web host.

-rw-r--r-- 279120 qhid    . . . the text file to search
-rwxr-xr-x    554 qsearch . . . the shell script
-rw-rw-rw-      0 tempz   . . . a temporary file to hold search results


'qsearch' works fine on my local computers, but when I try to run it on
my web host I see this error message:

~(location) line 6: 26955 Done
       fgrep -y "$name1" q-hid
     26956 Segmentation fault | fgrep -y "$name2" > tempz


What do I need to fix to get this to work?

Here's the script:

while (:) do
echo -e "Press S to search >>> \c"; ans=`readin`; echo; case $ans in
  [sS]) echo -e "Find what word? \c";read name1
        echo -e "and what second word? \c";read name2
        fgrep -y "$name1" q-hid | fgrep -y "$name2" > tempz
        cls; echo -e "\nSearch word(s): $name1 $name2";
        echo "Here are the first 10 results found:"; echo
        head -10 tempz; echo;;
  [qQ]) cls; echo; exit;;
  *) cls; echo "Not a valid option."; echo;;
esac
done






---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss