![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with script not able to take parameters passed to it | dsravan | Shell Programming and Scripting | 3 | 02-28-2008 05:09 PM |
| Problem with script not able to take parameters passed to it | dsravan | Shell Programming and Scripting | 7 | 10-09-2007 10:28 PM |
| Assigning a Variable all the Parameters passed | samit_9999 | UNIX for Dummies Questions & Answers | 2 | 12-04-2006 05:21 PM |
| variable passed to awk | whatisthis | UNIX for Dummies Questions & Answers | 3 | 09-15-2004 02:41 PM |
| variable passed to awk | whatisthis | UNIX for Dummies Questions & Answers | 8 | 09-15-2004 01:48 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
we want to produce a script that we can pass parameters of -a for email address and -s for subject then the report filename, so an exmaple would be;
email_report -a sendto@domain.com -s This is a test reportname.txt The problem we have is the subject can have more than one word, so I can't just get the next para after the -s. What I need to do is maybe place the subject in quotes so I can extract from the starting to the ending quote? Then how do I get the filename, as it 's the last parameter? |
|
||||
|
Write the script so that the report is standard input, then the command would be:
email-report -a mail@address -s "This is your report" <report filename If the report is the entire body of the email, then: mail -s "this is your report" mail@address <report-filename |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|