Sponsored Content
Top Forums Shell Programming and Scripting Script to create folder, copy file, and send email on success Post 302718353 by minnino on Friday 19th of October 2012 01:24:09 PM
Old 10-19-2012
Thanks rdrtx1, i ran that script and got the following output. The only thing i changed at all was the paths, and did an 'echo' in front of each line so i could see it run...







if [ ! -d /mnt/fas11/backup/2012-10-19 ]

then

mkdir /mnt/fas11/backup/2012-10-19
fi
= 1 ]

then

cp /mnt/fas11/vol0/etc/hosts /mnt/fas11/backup/2012-10-19

fi

= 1 ]

then

contains invalid character '\015'

Send options without primary recipient specified.

Usage: mailx [-BDFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr]
[-r from-addr] [-h hops] [-A account] [-R reply-addr] to-addr ...
mailx [-BDeHiInNRv~] [-T name] [-A account] -f [name]
mailx [-BDeinNRv~] [-A account] [-u user]

else
contains invalid character '\015'

Send options without primary recipient specified.
Usage: mailx [-BDFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-addr]
[-r from-addr] [-h hops] [-A account] [-R reply-addr] to-addr ...
mailx [-BDeHiInNRv~] [-T name] [-A account] -f [name]
mailx [-BDeinNRv~] [-A account] [-u user]

fi

CDCSMBRAL04:~/Desktop #


I also checked in my /mnt/fas11/backup folder and did not see a dated folder created.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to send a file in email

a file is created on a daily basis in the name xyz_pqr_20071207.dat.i want to send the file as an attachment if the file contains more than 50 records.how can i write a script such that it will transmit the file after the file is created.i want to sed the file to say asdf@xyz.com. please help me... (2 Replies)
Discussion started by: dr46014
2 Replies

2. Shell Programming and Scripting

Script to send email if new file is added when folder is updated

Hi, I have a script which updates a repository which is run manually. When this happens either no or new files will be added to a specific folder. If there are new files that have been added, an email needs to be sent. How can i check a folder for any new files after the update repos script has... (0 Replies)
Discussion started by: acc01
0 Replies

3. 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

4. UNIX for Advanced & Expert Users

send an email to my Drafts folder

Is there a way I can send a text file directly to my Drafts folder? (1 Reply)
Discussion started by: idontknow
1 Replies

5. Shell Programming and Scripting

how to avoid cron job output to send to the junk email folder?

Hi i created a cron job which invoke a shell script and output some content via email. Some times these output are sent to the junk email folder. i want these mails to be sent to inbox with some specific font. what i have to do? (4 Replies)
Discussion started by: vidhyaS
4 Replies

6. Shell Programming and Scripting

Shell script to send an email from the txt file

Hi Friends, Could you guys help me out of this problem... I need to send an email to all the users and the email has to be picked from the text file. text file contains the no. of records like: giridhar 224285 847333 giridhar276@gmail.com ramana 84849 33884 venkata.ramana@gmail.com... (6 Replies)
Discussion started by: giridhar276
6 Replies

7. Shell Programming and Scripting

Need help in writitng a script to rename file name and copy to other folder

Hi All, My requirement is as follows: A file (say abc) will be having list of the .txt file names. I need to read this abc file line by line and rename the .txt file names inside it and move them to other folder/path. Eg: abc ------- file1.txt file2.txt file3.txt Output (should... (1 Reply)
Discussion started by: pavan.yadalla
1 Replies

8. Shell Programming and Scripting

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: DailyTransaction_2015-03-09_ 200.csv before 200 their is... (1 Reply)
Discussion started by: krux_rap
1 Replies

9. Shell Programming and Scripting

How to copy all structure folder create last day?

HI All, please help , i got same case . i want copy folder and directory create yesterday. for sample below : drwxr-xr-x 4 apps apps 33 Nov 23 04:00 xxxxxx@gmai.com drwxr-xr-x 4 apps apps 33 Nov 23 04:00 yyyyyyy@gmail.com drwxr-xr-x 4 apps apps 33 Nov 24 04:00... (2 Replies)
Discussion started by: fajar_3t3
2 Replies

10. UNIX for Beginners Questions & Answers

Shell script to execute Oracle procedure and trigerring email on success and failure

Here is the shell script which need to trigger a stored procedure and when the record count is 0 then it should capture in the log that 0 duplicate records are found and if it's more than 0 then log with no of records. Also if there is any sqlerror then it should write the same in the log file and... (17 Replies)
Discussion started by: senmng
17 Replies
FETCH(9)						   BSD Kernel Developer's Manual						  FETCH(9)

NAME
fetch, fubyte, fuibyte, fuiword, fulong, fuulong, fuword -- fetch data from user-space SYNOPSIS
#include <sys/types.h> #include <sys/time.h> #include <sys/systm.h> #include <sys/resourcevar.h> int fubyte(const user_addr_t addr); int fuibyte(const user_addr_t addr); int fuiword(user_addr_t addr); int64_t fulong(user_addr_t addr); uint64_t fuulong(user_addr_t addr); int fuword(user_addr_t addr); DESCRIPTION
The fetch functions are designed to copy small amounts of data from user-space. The fetch routines provide the following functionality: fubyte() Fetches a byte of data from the user-space address addr. fuibyte() Fetches a byte of data from the user-space address addr. This function is safe to call during an interrupt context. fuiword() Fetches a word of data from the user-space address addr. This function is safe to call during an interrupt context. fulong() Fetches a long word of data from the user-space address addr. fuulong() Fetches a unsigned long word of data from the user-space address addr. fuword() Fetches a word of data from the user-space address addr. RETURN VALUES
The fetch functions return the data fetched or -1 on failure. SEE ALSO
copy(9), store(9) BSD
December 16, 2004 BSD
All times are GMT -4. The time now is 01:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy