we dont have the option for -a on on the platforms in the man for mailx.
Do we have any workaround to send multiples files in a directorty :
I have tried below but it doesnt attach files
Code:
(
for i in /dir/*.*
do
uuencode "$i" $(basename "$i") ;
done
) | mailx -s "Subject" mail_addrr < /dir/Mail_Body.txt
Code:
Flags
Flags Description
Item
Description
-c Address(es)
Specifies the list of users to which a copy of the message is sent. You can specify one or more addresses. When specifying more than one address, the list of addresses must be in (" ") quotes.
-d
Specifies the debug information associated with the users mailbox
* uid
* user name
* mail file folder (the system mailbox)
* dead letter (the system saves incomplete messages in the dead.letter file in the $HOME
* mbox (the personal mailbox)
Note: The message is not sent when the program is in the debug mode.
-e
Tests for the presence of mail in the system mailbox. The mail utility will write nothing and exit with a successful return code if there is mail to read.
-f FileName
Reads messages from the named file. If a file operand is not specified, then reads messages from mbox. When you quit from reading the messages, undeleted messages are written back to this file.
Code:
The following options are accepted:
-A name
Executes an account command (see below) for name after the startup files have been read.
-a file
Attach the given file to the message.
-B Make standard input and standard output line-buffered.
-b address
Send blind carbon copies to list. List should be a comma-separated list of names.
-c address
Send carbon copies to list of users.
-D Start in disconnected mode; see the description for the disconnected variable option.
-d Enables debugging messages and disables the actual delivery of messages. Unlike -v, this option is intended for mailx development only.
-e Just check if mail is present in the system mailbox. If yes, return an exit status of zero, else, a non-zero value.
-E If an outgoing message does not contain any text in its first or only message part, do not send it but discard it silently, effectively setting the skipemptybody variable at program startup. This
is useful for sending messages from scripts started by cron(8).
-f [file]
Read in the contents of the user's mbox (or the specified file) for processing; when mailx is quit, it writes undeleted messages back to this file. The string file is handled as described for the
folder command below.
Moderator's Comments:
Please use CODE tags as required by forum rules!
Last edited by RudiC; 03-15-2019 at 01:03 PM..
Reason: Added CODE tags.
Hi,
I would like to send an email with more than one attachement. I am using uuencode. I want to achive by suing uuencode. Also please let me know other ways.
-Thambi (7 Replies)
Hi All,
We are having important config files in an directory which was accessable by all
/auto/config/Testbed/>ls
config1.intial
config2.intial
config3.inital
often we find that some of the lines are missing in config files, we doubt if some one is removing.
I would like to write... (0 Replies)
I am using gfortran and want to send .o files in separate directory.
Currently I have the following in a bash script. The .mod files are handled ok, but the .o files are still created in the same directory as the source code
fsrc="newunit.f08 math.f08 tString.f08 prout.f08 prary.f08... (1 Reply)
Hi all,
i have a folder, with tons of files containing as following,
on /my/folder/jobs/
some_name_2016-01-17-22-38-58_some name_0_0.zip.done
some_name_2016-01-17-22-40-30_some name_0_0.zip.done
some_name_2016-01-17-22-48-50_some name_0_0.zip.done
and these can be lots of similar files,... (6 Replies)
Given a directory containing say a few thousand files,
please output a list of all the names of the files in the directory that are exactly the same, i.e. have the same contents.
func(a_directory_name) output -> {“matches”: , ... ]}
e.g. func(“/home/my/files”) where the directory... (7 Replies)
Hi all,
I have a script issue I can't seem to work out.
In a directory I have several folders and I want to send just the sapdata1 to sapdata14 folders and their contents but not sapdataXX/.snapshot
the script is:
#!/bin/bash
# SETUP OPTIONS
export SRCDIR="/scratch/doug/test/sapdata*"... (5 Replies)