By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,767 Members | 1,068 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,767 IT Pros & Developers. It's quick & easy.

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

P: 3
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.....
Jul 28 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,275
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.

Jul 29 '08 #2

Expert Mod 2.5K+
P: 4,677
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.
Jul 29 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.