Sponsored Content
Top Forums UNIX for Advanced & Expert Users use email subject line as shell command Post 61012 by mskarica on Wednesday 26th of January 2005 10:51:50 PM
Old 01-26-2005
Im in graduate school in Software Engineering. We use an email repository system built by the dean of our department that is used for students to submit their programming assignments to the instructor. The system is implemented using C shell scripts. The downfall of the system is that the student must be at school, logged in to their unix account in order to submit their program to the instructor.

I'm trying to find a way that will enable students to email their program to the instructor from home using their hotmail, yahoo, or any other email system so that they do not need to be at school to submit their programs. I'm trying to accomplish this by having a script run automatically when an email is received on the instructors unix email account. The script will check the first word of the subject line, if the first word is "XSsubmit" then I want to save all of the attachments to a directory (the files must be in the directory for the submit command to submit the files), then forward the entire subject line to a command prompt and run the command. Then this will submit the files to the instructors submission repository.

This is where my problem comes in. I need to get the attachments saved to the directory automatically, and then I need to get the subject field to a command prompt to invoke the submit script but have no idea how to.

I was going through some of the forum questions and saw that you are not supposed to post homework questions. This is not a homework assignment that I'm doing, its an entire project that I am working on that I'm trying to actually get into production.

Any help, pointing in the right direction like a book, website, anything would be great.

Last edited by mskarica; 01-28-2005 at 09:29 PM.. Reason: explain question better
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

create email w/ ASCII attachment via command-line

All, I need to email an ASCII data file to a business partner, and intended on creating a Korn Shell script to create an email message (minimal text), and attach the ASCII data file to the email. It seems this is not as easy as I had thought it might be. sendmail does not support... (3 Replies)
Discussion started by: jwperry
3 Replies

2. Shell Programming and Scripting

Run a script based on the subject line of the email

Hi, I need help in running a script that would pull info from an email subject line and run a script (foo.sh). I'm pretty sure after a bit of googling that this is possible in several ways. but none was pretty clear on how to accomplish it. The part that I really need help with is getting the... (5 Replies)
Discussion started by: satekn
5 Replies

3. Shell Programming and Scripting

executing/including command in mailx subject line

Hi, Is it possible for me to include the results from a command in the subject line? What I am looking to do is get the file count and include it into the subject line as well as the list of files in the body. Example Subject line: Currently 25 files in directory My Code: #!/bin/ksh cd... (2 Replies)
Discussion started by: ozifer
2 Replies

4. Shell Programming and Scripting

help with script to send email and if subject line match is found

Help with script that will check log, then find a match is found, add that as the subject line. 1. The script will always run as a deamon.. and scan the event.log file 2. when a new 101 line is added to the event.log file, have the script check position 5,6 and 7 which is the job name, which... (2 Replies)
Discussion started by: axdelg
2 Replies

5. Ubuntu

Command line email help needed

Hi, having some problems getting commandline mail to work for root user in ubuntu. Ive installed the following packages - msmtp & mailx and the cert for gmail. I've created 3 files: mailrc and msmtprc in /home/username directory and /etc/exim4/passwd.client mailrc ------ set... (0 Replies)
Discussion started by: ziggycat
0 Replies

6. Shell Programming and Scripting

Subject line of an email

Hi all, I am trying to automate a process in which at the end of the process the script should send an email to the user saying this process is completed. I have done everything but the problem now is the subject line of the email... the subject line looks like this.. where abc xyz is a... (4 Replies)
Discussion started by: smarty86
4 Replies

7. UNIX Desktop Questions & Answers

Send Email from command line in Ubuntu 11.10

Have problem to send email from command line according to the posts like this one: To have the ability to send email from the command line, you will need to install the mailutils and postfix packages with the following commands. apt-get install mailutils apt-get install postfix Now... (1 Reply)
Discussion started by: yifangt
1 Replies

8. Shell Programming and Scripting

Sending sql output to email body with conditional subject line

hi , i have written below piece of code to meet the requirement but i am stuck in the logic here. the requirement are: 1) to send the sql out put to email body with proper formatting. 2) if count_matching = Yes then mail should triggered with the subject line ... (10 Replies)
Discussion started by: itzkashi
10 Replies

9. UNIX for Beginners Questions & Answers

Variable not displaying in subject line of mailx email

Hi Newbie here with first post. I've got a shell script (ksh) whereby I run a SQL*Plus script and output the results to a file. I then check the output file in an if statement that looks like this: if ]; then export GAPNUM=`awk '{print $4}' $OUTFILE` if ] then mailx -s... (10 Replies)
Discussion started by: ltzwoman
10 Replies
CONDOR_QSUB(1)							   User Commands						    CONDOR_QSUB(1)

NAME
condor_qsub - minimalistic qsub emulation for Condor SYNOPSIS
condor_qsub [OPTIONS] [<command> [<command_args>]] DESCRIPTION
Minimalistic emulation of SGE's qsub for Condor. The primary purpose of this emulation is to allow SGE-style submission of dependent jobs without the need to specify the full dependency graph at submission time. This implementation is neither as efficient as Condor's DAGMan, nor as functional as SGE's qsub/qalter. It merely serves as a minimal adaptor to be able to use software original written to interact with SGE in a Condor pool. In general condor_qsub behaves just like qsub. However, only a fraction of the original functionality is available. The following list of options only describes the differences in the behavior of SGE's qsub and this emulation. Qsub options not listed here are not supported. OPTIONS
-b <y|n> If 'y', command and arguments given on the command line are wrapped into a shell script which is then submitted to Condor. --condor-keep-files This is a non-SGE option. If given, it will prevent condor_qsub from deleting temporary files (generated submit files, sentinel jobs). This is mostly useful for debugging. -cwd If given, this option will cause the 'initialdir' value in the Condor submit file to be set to the current directory. -e <filename|path> Name of the file to contain the STDERR output of the job. By default this will be job_name.ejob_id[.task_id]. If an existing direc- tory is specified, the file will be placed inside this directory using the default schema for the filename. -h,--help Print usage summary and option list. -hold_jid <jid> If given, the job will be submitted in 'hold' state. Along with the actual job a 'sentinel' job will be submitted to Condor's local universe. This sentinel watches the specified job and releases the submitted job whenever the job has completed. The sentinel observes SGE's behavior to detect job exiting with code 100 and not start depedent job in this case. If a cluster id of an array job is given the dependent job will only be released after all individual jobs of a cluster have completed. -l <ressource spec> This option is currently ignored. -m <a|e|n><...> SGE's notification labels will be translated (approximately) into Condor's notifications states (Never, Error, Complete). -M <email> Added as 'notify_user' to the submit file. -N <jobname> Determines the default name of logfile (stdout, stderr). -o <filename|path> See -e option, but for a job's stdout. -p <int> Added a 'priority' to the submit file. -r <y|n> This option is currently ignored. -S <shell> Path to a shell binary for script execution. -shell <y|n> This option is currently ignored. -t <start>[-<stop>[:<step>]] Task ID specification for array job submissions. -q <queue name> This option is permanently ignored, as Condor doesn't have multiple queues. -V If given, 'getenv = True' is added to the submit file. --version Print version information and exit. This script is released under the Apache V2.0 License. It was written by Michael Hanke <michael.hanke@gmail.com>. condor_qsub 0.1 September 2012 CONDOR_QSUB(1)
All times are GMT -4. The time now is 01:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy