Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: Script Help

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Script Help

    Hi all,

    I am trying to do a for each script but cant seem to get it right, can someone point me in the correct direction?

    This is what i have so far.


    grep UPDATED=Y *.lib


    grep UPDATED=Y -B 8 *.lib | grep NAME= > newsigs`date '+%d%m%y'`
    cat newsigs`date '+%d%m%y'` | mail -s "NEW SIGS"
    rm -f newsigs`date '+%d%m%y'`


    cat No_New_Sigs | mail -s "NO NEW SIGS"

    now what i want to achieve is after the 'then' i want a for each command that has the following commands in:

    grep UPDATED=Y -B 8 *.lib | grep NAME= > newsigs`date '+%d%m%y'`
    grep UPDATED=Y -B 8 *.lib | grep EVENTGROUP= > newsigs`date '+%d%m%y'`

    Any help is much appreciated

    Nick T

  2. #2
    Linux Newbie jpalfree's Avatar
    Join Date
    Jul 2005
    Montreal, CA
    I'm not sure what you are trying to do... and I assume you want a BASH script. I'd be glad to help but you need to explain, step by step, what you are trying to do.
    Avatar from, a hilarious computer related webcomic.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts