Verwirrung bei Befehlsoptionen in curl unter Linux

Verwirrung bei Befehlsoptionen in curl unter Linux

Sie fragen sich, welche Funktion das @Zeichen hat? Hier ist ein Beispielbefehl:

curl -w "@curl-format.txt" -o /dev/null -s "http://wordpress.com/"

Hier sind weitere verwandte Hintergründe,

https://stackoverflow.com/questions/18215389/wie-messe-ich-die-anfrage-und-antwortzeit-auf-einmal-mit-curl

Antwort1

es bedeutet lediglich, das Format aus der benannten Datei zu lesen.

aus dem Handbuch:

  -w, --write-out <format>
    Defines  what  to  display on stdout after a completed
and successful operation. The format is a string that may contain
plain text mixed with any number of variables. The string can be 
specified as "string", to get read from a particular file you
specify it "@filename" and to tell curl to read the format from
          stdin you write "@-".

Die Verwendung von @ auf diese Weise ist ziemlich üblich, Curl verwendet es an mehreren Stellen und auch andere Befehle tun dies.

verwandte Informationen