1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

[solved] How do i extract Linux command out of an e-mail file?

Discussion in 'Programming' started by postcd, Apr 7, 2017.

  1. #1
    Hello,

    please how can i extract an Linux command out of e-mail message?

    I sent an e-mail with this text:
    and in the received e-mail file is:
    The e-mail encoding is:
    Content-Type: multipart/alternative
    Content-Type: text/html; charset=UTF-8
    Content-Transfer-Encoding: quoted-printable

    Please which example command can i use to extract that Linux command out of the mail file not knowing which command the file will contain, only knowing that the command will be after string "cmd: " ?

    I am able to extract alphanumeric string, but i do not know how to do what i explained.

    Thank You
     
    postcd, Apr 7, 2017 IP
  2. postcd

    postcd Well-Known Member

    Messages:
    1,037
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    190
    #2
    I think this would be quite difficult awk or sed command/s, so i think i will rather make sure e-mail is sent without any special html formating (as a plain text), that way the command seems to remain same as it was typed.
     
    postcd, Apr 7, 2017 IP
  3. postcd

    postcd Well-Known Member

    Messages:
    1,037
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    190
    #3
    I think this would be quite difficult awk or sed command/s, so i think i will rather make sure e-mail is sent without any special html formating (as a plain text), that way the command seems to remain same as it was typed.
     
    postcd, Apr 7, 2017 IP