Re: Writing a script that looks for missing data

From: Alan Connor (zzzzzz_at_xxx.yyy)
Date: 03/30/04


Date: Tue, 30 Mar 2004 15:28:08 GMT

On 30 Mar 2004 06:41:00 -0800, Ludwig77 <gregrjones@yahoo.com> wrote:
>
>
> I'm trying to write a script that will execute an action if a piece of
> data is missing from a flat file.
>
> Here is what I have so far:
>
> (for j in "data1" "data2" "data3"
> do
> egrep $j flat_file
>
> I'm stuck with how to test if the $j variable is NOT in the flat_file.
>
> I'm attempting this in Linux

if ! egrep "$j" ...... ; then ........ ; else ...... ; fi

The "!" means "no".

AC



Relevant Pages

  • install_driver(Sybase) failed
    ... can anyone help me identify if I am missing anything... ... I get the below error on trying to execute a script that tries to connect to a sybase database.. ... Dynamic Linking: ...
    (perl.dbi.users)
  • Re: Writing a script that looks for missing data
    ... > I'm trying to write a script that will execute an action if a piece of ... > data is missing from a flat file. ... Linux solution for data processing and document management. ...
    (comp.unix.shell)
  • Re: Writing a script that looks for missing data
    ... >> I'm trying to write a script that will execute an action if a piece of ... >> data is missing from a flat file. ...
    (comp.unix.shell)
  • Writing a script that looks for missing data
    ... I'm trying to write a script that will execute an action if a piece of ... data is missing from a flat file. ...
    (comp.unix.shell)
  • Re: Will Linux become as vulnerable as MS ??
    ... > beeing vulnerable to viruses. ... > that they know are executable, and execute intentionally. ... >> Linux, each distro is a little different, and even within the distro, ... > Since clicking on a script is easier than typing it's name, ...
    (comp.os.linux.security)