bash 从另一个脚本运行 curl

时间:2020-12-19 13:33:20

标签: bash curl

在 win7 cmder (git-for-windows?)

库:

 public partial class ControlVolumen : UserControl
    {
        double valor = 0.65;  // This need to be fetched from User input
        Color fondo;
        Color color1;
        Color color2;
        Color color3;
        public ControlVolumen()
        {
            InitializeComponent();
            // valor = 0;
            fondo = Color.Blue;
            color1 = Color.Green;
            color2 = Color.Yellow;
            color3 = Color.Red;
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            Graphics g = e.Graphics;
            Brush b = new SolidBrush(fondo);

            //calculate width and height based on percentage provided
            int ancho = (int)((double)this.Width * valor);
            int alto = (int)((double)this.Height * valor);

            Point p0 = new Point(0, alto);
            Point p1 = new Point(ancho, 0);
            Point p2 = new Point(ancho, alto);
            g.FillPolygon(b, new Point[] { p0, p1, p2 });
        }
    }

set -x curl.exe -s $1 echo $? echo $1 单独工作完美。

<块引用>

lib 节目:

set -x

现在,从其他脚本运行 + curl.exe -s 'https://example.com'

librun.sh:

lib

此处,FILE=url.txt while read line; do bash lib $line done < "$FILE" 返回错误代码 3。

<块引用>

curl 节目:

set -x

1 个答案:

答案 0 :(得分:0)

以下内容:

IP

表示 url.txt 包含 Windows line endings。将它们转换为 UNIX 行结尾:

$'https://example.com\r'