Bash for checking and copy Daily files and send an email


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Bash for checking and copy Daily files and send an email
# 1  
Old 03-09-2015
Bash for checking and copy Daily files and send an email

Hello,

Trying to get a bash for files received on daily basis and want to copy those files to different directory and send an email notification if file exists then send the file counts else Alert with no file received.

FileName format:
Code:
DailyTransaction_2015-03-09_ 200.csv

before 200 their is a space and will be receiving occasionally without space, just need to watch out for space or without space.


Please help
# 2  
Old 03-09-2015
Please also show us what you've attempted.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Leanest way to send an email from bash

Is there a quick and dirty utility to send emails (does not need to be part of a package to receive and view email, in fact, I'd prefer if it wasn't). Ideally I would like to be able to send attachments as well. Mike ---------- Post updated at 04:29 PM ---------- Previous update was at... (9 Replies)
Discussion started by: Michael Stora
9 Replies

2. Shell Programming and Scripting

Bash Script: Send files to SFTP using Expect

I have to send few gzipped files from local server to SFTP server. My Server Info Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise Created a bash script and could able to send files to sftp, but i want to send email if transfer is successful. ... (1 Reply)
Discussion started by: krux_rap
1 Replies

3. Shell Programming and Scripting

How to send file from windows to UNIX daily?

Hi All! I am trying to write a little script that should go to a windows server get one file and put on a unix server, but I am not sure if it is the right way please help: #! /usr/bin/sh HOST=10.100.48.41 USER=ftp_hm PASSWD=P@$$w0rd ftp -n $HOST quote user $USER quote pass $PASSWD... (7 Replies)
Discussion started by: fretagi
7 Replies

4. UNIX for Dummies Questions & Answers

Checking files in remote server and decide to copy file or not

Hi there, I have a problem in my script, I need to check whether file exists in remote server or not, if the file exists, then stop copy else copy the file to the server.. my code is something like this while read $server do if ssh $server "cd $directory_name; if ; then echo "Error:... (2 Replies)
Discussion started by: beezy
2 Replies

5. Shell Programming and Scripting

Script for checking files for last hour and send a mail

Hello, I need to write a script to check the files in one folder , if that folder doesn't have files generated from last 1 hr then we need to send mail to particular persons. So Can you please help me to write script to check the files and send email. Thank you.. (1 Reply)
Discussion started by: archana23
1 Replies

6. Shell Programming and Scripting

Script to create folder, copy file, and send email on success

I am very new to UNIX as well as scripting so please be gentle, haha. I have a Linux client which has a mount point mapped to my /etc folder on a NetApp FAS system. I woudl like to be able to copy the hosts and rc files once a week from the FAS to a different location for backup. When the... (4 Replies)
Discussion started by: minnino
4 Replies

7. UNIX for Dummies Questions & Answers

Send Files as Attachments through email

Dear Members, I am trying to send a file as an attachment from the command prompt in Linux. I am using the following: (echo "Find attached Exception Report"; uuencode $DATA_TOP/out/data/$err_rpt_file $err_rpt_file)|/bin/mailx -s "***Exceptions Found" davidk@xyz.com Here err_rpt_file... (2 Replies)
Discussion started by: sandeep_1105
2 Replies

8. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

9. Shell Programming and Scripting

need to send files to an email id

Hi,I would like to send all the files in a particular folder to an e-mail id .I am able to send a particular file via email but that gets displayed in the email as content using the mailx option. I just want to view it in the mailbox as an attached file. Could you please help me out in... (1 Reply)
Discussion started by: arunkumarmc
1 Replies

10. UNIX for Dummies Questions & Answers

Counting Files and send an email Notification if it exceeds a limit

Hi, I am trying to write a script to Count Files in a directory located on a remote server and send an email Notification if it exceeds a limit. The code given below doesnot check the condition and sends the mail everytime irrespective of the condition. I have put this script in the cron. Can... (10 Replies)
Discussion started by: amitsayshii
10 Replies
Login or Register to Ask a Question