An AWK question

From: antenneX (antennex_at_swbell.net)
Date: 02/04/05

  • Next message: Chad Leigh -- Shire.Net LLC: "Re: can't build "jail" in 5.3-RELEASE-p5"
    To: <freebsd-questions@freebsd.org>
    Date: Fri, 4 Feb 2005 13:14:57 -0600
    
    

    ---> FBSD-4.10p2

    I have a script that tells me when a mailbox exceeds 2MB. Using it for
    another purpose. how can I modify this script to tell me when a file is
    LESS than a certain size?

    ---------------------------------------------
    #!/bin/sh

    #AWK=/usr/bin/awk
    #FILE=/file/size/to/check
    #LS=/bin/ls
    #SIZE=2048 # (2048 = 2MB)

    #if [ `${LS} -s ${FILE} | ${AWK} '{ print $1 }'` -gt ${SIZE} ]; then
    # echo File ${FILE} is ABOVE normal | mail -s "Alert: Check the file"
    #fi
    ---------------------------------------------

    Thanks, and....

    Best regards,

    Jack L. Stone

    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Chad Leigh -- Shire.Net LLC: "Re: can't build "jail" in 5.3-RELEASE-p5"

    Relevant Pages

    • Modifying Primary Key Values
      ... Let's suppose I have a table MyTable (A INT PRIMARY KEY, ... In this script I modify the A column /the primary key/. ... You understand that I cannot rely for that purpose on the A column /the ...
      (microsoft.public.sqlserver.programming)
    • Re: An AWK question
      ... > I have a script that tells me when a mailbox exceeds 2MB. ... > another purpose. ... how can I modify this script to tell me when a file is ...
      (freebsd-questions)
    • Re: Modifying a record field value while not blocking it to others
      ... And of course again the record you are trying to modify has not to be 'open' ... someone opens that ID=12 record everything in it is locked. ... often add a script line which opens a random record if the file holds enough ... system where customers use Credits when renting items and get Credits ...
      (comp.databases.filemaker)
    • Re: modifying objects in ADAM ADSIEDIT
      ... which is the NetBIOS name I referred to. ... ' Prompt for NetBIOS name of object in AD. ... ' Prompt for the attribute to modify. ... How do I script this by just modifying ...
      (microsoft.public.windows.server.scripting)
    • Re: sus office updates
      ... You can modify the registry ... or you can script a change for MSI to add ... my "encrypted" product code for Office 2003 Professional is: ...
      (microsoft.public.sms.tools)