Changes between Version 18 and Version 19 of Plugins/Execute
- Timestamp:
- 11/01/2014 08:15:28 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Plugins/Execute
v18 v19 40 40 torrentname=$2 41 41 torrentpath=$3 42 43 42 echo "Torrent Details: " $torrentname $torrentpath $torrentid >> /tmp/execute_script.log 44 43 }}} 45 44 46 The variables should show up in the log file. 47 {{{ 48 tail /tmp/execute_script.log 49 }}} 45 The variables will show up in the log file: `/tmp/execute_script.log` 46 50 47 === Windows Batch === 51 48 Save this with `.bat` extension such as `execute_example.bat`: … … 56 53 set torrentname=%2 57 54 set torrentpath=%3 58 59 55 @echo Torrent Details: %torrentname% %torrentpath% %torrentid% >> C:\execute_script.log 60 56 }}} 61 57 62 The variables should show up in the log file. 58 The variables will show up in the log file: `C:\execute_script.log` 59 60 === Perl === 63 61 {{{ 64 C:\execute_script.log 62 #!perl 63 #!/usr/bin/perl 64 $torrentid = $ARGV[0]; 65 $torrentname = $ARGV[1]; 66 $torrentpath = $ARGV[2]; 67 open(my $fh, '>>', '/tmp/execute_perl.log'); 68 print $fh "Torrent Details: $torrentname $torrentpath $torrentid\n" 65 69 }}} 70 71 The variables will show up in the log file: `/tmp/execute_perl.log` 66 72 67 73 === Python ===