我在Windows平臺上遇到以下非常簡單和小型的Perl腳本問題。 use strict;
use warnings;
use threads;
use threads::shared;
my $print_mut : shared;
my $run_mut : shared;
my $counter : shared;
$counter = 30;
############
我有以下腳本: #!/bin/sh
Q=`</dev/urandom tr -dc A-Za-z0-9 | head -c30`
mysql -uusername -ppasword accounts -e "update forum set key='$Q' where id='1';"
我要補充反單引號(``),以「論壇」,「鍵」和「ID」,否則返回我的錯誤: ERROR 1064
我想運行一個命令使用管道,但接收錯誤: echo abc | `echo "grep a | grep b"`
grep: |: No such file or directory
grep: grep: No such file or directory
grep: b: No such file or directory
什麼是錯的代碼? 預期結果是要被執行的以下命令: echo a