Results 1 to 2 of 2

Thread: Can Anyone Help With A Simple Script??

Hybrid View

  1. #1

    Can Anyone Help With A Simple Script??

    I am new to Linux and was wondering if anyone could help me with a script I have been trying to write?? In a nutshell, here is what I'm trying to accomplish:

    I have a file in /var/backup that hopefully contains the word "successful".

    I want to grep successful in /var/backup and if "successful" is present, replace all verbiage in the file with a simple "2", then output the file to /var/spool/XX

    If the grep returns nothing, replace all verbiage in the file with a simple "1", then output the file to /var/spool/XX

    If anyone could help me with this I would greatly appreciate it. Thanks.

  2. #2
    Senior Member
    Join Date
    May 2004
    Location
    Pakistan
    Posts
    253

    Re:

    Dear Gary Penner,
    Hello,

    # man awk
    # man sed
    # man cut


    Best Regards.
    Färrükh Ähmëd

Similar Threads

  1. Simple Website Monitoring Script in Perl
    By tuxette in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 01-15-2009, 05:03 PM
  2. Simple Website Monitoring Script in Perl
    By peter in forum Tutorials
    Replies: 0
    Last Post: 11-24-2008, 04:59 AM
  3. Simple firewall script
    By modules in forum Security
    Replies: 2
    Last Post: 02-22-2006, 09:39 AM
  4. Probs in a script called from another script
    By Outlaw in forum Programming
    Replies: 1
    Last Post: 03-12-2004, 02:54 PM
  5. Please help-Should be simple
    By M_A_G_I_C in forum Mandriva
    Replies: 8
    Last Post: 12-03-2002, 01:02 AM

Bookmarks

Posting Permissions

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