Thread: UNIX command

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2011
    Posts
    1
    Rep Power
    0

    UNIX command


    Hi Experts,

    Basically I am a SAP programmer. I don't know much about UNIX. But I got a situation, need to use UNIX command in my programming.

    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.

    ============
    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
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2005
    Posts
    50
    Rep Power
    10
    Originally Posted by rbadveli
    Hi Experts,

    Basically I am a SAP programmer. I don't know much about UNIX. But I got a situation, need to use UNIX command in my programming.

    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.

    ============
    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
    Wasn't this already answered here?

IMN logo majestic logo threadwatch logo seochat tools logo