Execute Perl script on remote server from local machine

前端 未结 2 1025
情深已故
情深已故 2021-01-19 14:09

I am rather new to Perl and translating some bash scripts to parse Apache logs from several remote production servers into a more useful format for processing on a local mac

2条回答
  •  轮回少年
    2021-01-19 14:53

    If you're not passing arguments to the script, it should be as simple as

    ssh "user@host" perl < $crawler

    If you want to pass command line args, just use a "-" placeholder to get the same affect as the bash -s, i.e.

    ssh "user@host" 'perl - arg1 arg2' < $crawler

提交回复
热议问题