Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash linux下如何使用Shell脚本旋转SVG图像_Bash_Svg - Fatal编程技术网

Bash linux下如何使用Shell脚本旋转SVG图像

Bash linux下如何使用Shell脚本旋转SVG图像,bash,svg,Bash,Svg,我想在Linux中使用shell脚本生成SVG图像。一切都好。但是如何在脚本中插入transform=“translate(30)rotate(45 50 50)” #!/bin/bash echo "<!DOCTYPE html> <html> <head> <title>SVG</title> </head> <body> <svg width="1028px" hei

我想在Linux中使用shell脚本生成SVG图像。一切都好。但是如何在脚本中插入transform=“translate(30)rotate(45 50 50)”

  #!/bin/bash
  echo "<!DOCTYPE html>
  <html> 
  <head>
  <title>SVG</title>
  </head>
  <body>
  <svg width="1028px" height="728px">
  <rect fill="#FACE8D" x="0" y="0" width="1028px" height="728px" rx="10"
  ry="10"  stroke="green" stroke-width="8" />
  <text x="150pt" y="300pt" fill="red" font-
  size="40pt" transform="translate(30) rotate(45
  50 50)" stroke="#000000" >some text</text>
  </svg>

  </body>
  </html>"
#/bin/bash
回声“
SVG
一些文本
"

但问题是,当在shell脚本中调用translate函数时,我出现了错误。由于“(”)。然后我尝试使用transform=“translate\(30\)rotate\(45,50\)”,但两者都不起作用。那么如何做到这一点呢

快速的方法是只使用echo“markup”而不是echo“markup”,所以它不会被解释