Can anyone help me with shell script(find a file and email)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pravada
    New Member
    • Jul 2008
    • 3

    Can anyone help me with shell script(find a file and email)

    Hi i am new to unix. just trying to work my things out.

    i have a small problem.
    i needed to search for a file that is created mostly first week of every month and email it to a list.... can some one please help me with a script to do so.....

    thanks in advance.....
    pradeep
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    You should use find command and the mailx command to do this.
    Check the man page of find command to to get some idea baout the find command.


    raghu

    Comment

    • sicarie
      Recognized Expert Specialist
      • Nov 2006
      • 4677

      #3
      If the file is in a standard location and uses a naming convention (if this is automatically generated, it's likely that the naming convention would be something like 'filename-date' in which case you could just code your script to determine this month's file and send it out.

      Of course, this is dependent on there not being any other files in the directory with this name, and that name being standard each month.

      Comment

      Working...