|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | 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. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
UNIX script / Command >>> in one line
Hi Experts, Basically I am a SAP programmer. I don't know much about UNIX. But I got a situation, need to use UNIX script /command in my programming. I searched the forum and found the below code. I would like to pass the below UNIX script in my programming code. But my programming will not allow line by line. Can I able to pass below script in one single line. Please share your answers. ============ Code:
outputFile="/tmp/out.html" ( echo "From: abc@xyz" echo "To: def@xyz" echo "MIME-Version: 1.0" echo "Subject: Test" echo "Content-Type: text/html" cat $outputFile ) | sendmail -t ============ Thanks in Advance Raghu Last edited by pludi; 11-16-2011 at 05:46 PM.. |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Yet again and forevermore I deeply sympathize with anyone forced to use that. This code will only work in an actual shell. If SAP doesn't run it in an actual shell, it'll give you errors like `outputFile="/tmp/out.html"': command not found Code:
outputFile="/tmp/out.html" ; ( echo "From: abc@xyz" ; echo "To: def@xyz" ; echo "MIME-Version: 1.0" ; echo "Subject: Test" ; echo "Content-Type: text/html" ; cat $outputFile ) | sendmail -t |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| perl/unix: script in command line works but not in perl | kpddong | Shell Programming and Scripting | 2 | 01-11-2011 01:27 PM |
| unix command : how to insert text at the cursor location via command line? | xib.be | UNIX for Advanced & Expert Users | 0 | 12-22-2010 05:45 PM |
| Need help! command working ok when executed in command line, but fails when run inside a script! | 4dirk1 | Shell Programming and Scripting | 4 | 12-02-2010 05:47 AM |
| assign a command line argument and a unix command to awk variables | sweta_doshi | Shell Programming and Scripting | 0 | 08-08-2008 06:54 AM |
| Unix Script with line number at beginning of each line. | mascorro | Shell Programming and Scripting | 5 | 06-19-2006 04:34 PM |
|
|