awk 内部的字符串拼接及命令执行
test.csv
head -n 1 test.csv
username https://test.com/1.pdf 2020-12-01
awk '{
print "line:",NR,$0;
filename="/tmp_dir/"$1"_"$3".pdf";
print filename;
cmd="curl -o "filename" "$2;
print cmd;
system(cmd);
}' test.csv
awk 内部的字符串拼接及命令执行
test.csv
head -n 1 test.csv
username https://test.com/1.pdf 2020-12-01
awk '{
print "line:",NR,$0;
filename="/tmp_dir/"$1"_"$3".pdf";
print filename;
cmd="curl -o "filename" "$2;
print cmd;
system(cmd);
}' test.csv