1

I'm trying to create an automated excel script and I want that script to send the output data to another system through plink for example. I've succeeded with opening the plink and connecting to the right server already so that's no problem. My problem is that I want plink to send the text that I keep in a text document and for that, I've been trying to make the -m setting work for plink.

Here is an example of the type of text I want plink to send:

<?xml version="1.0" standalone="no"?>       
<!DOCTYPE labels SYSTEM "label.dtd">        
<labels _FORMAT="TEST.layout" _QUANTITY="1" _PRINTERNAME="Printer 1" _JOBNAME="LBL101">
    <label>     
<variable name="Antal">56</variable>
<variable name="EAN_nr">514515615613</variable>
<variable name="Material_nr">1514651465</variable>
<variable name="Bäst_Före">220301</variable>
<variable name="Nettovikt">021523</variable>
<variable name="Artikel">Watermelons</variable>
<variable name="Produktionsdatum">210301</variable>
<variable name="SSCC">1565145156156165</variable>
<variable name="Barcode1">1451251416541513</variable>
<variable name="Barcode2">526154561</variable>
<variable name="Barcode3">54156165145145616</variable>
<variable name="Barcode4"></variable>
    </label>        
</labels>   

(Yes it is dummy values)

Anyway, I've not gotten the-m option to work, plink just accepts the fact that the option is chosen and doesn't seem to do anything. But it will complain if I put an invalid file path.

So if anyone would like to point out what I'm doing wrong that would be great!

0

1 Answer 1

0

The -m switch of Plink works with SSH only.

For other protocols, you need to use input redirection. In cmd.exe (or batch file), you would do it like this:

plink -raw host < input.xml
2
  • Well works a little bit more than before, I'm getting a "parse error" on the machine not in cmd. It seems as if plink doesn't output all the XML text but instead only sends the text between < > or something. Can you make it send everything without looking at any delimiters.?
    – Nils
    Commented Aug 12, 2021 at 8:31
  • I'm sure Plink sends the input as is, without any modification. Commented Aug 12, 2021 at 8:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .