Linux & Terminali

Here documents (<<EOF)

Në shqip: Dokumentet „here“ (<<EOF)

ShpjegimiSQ

Një heredoc të lejon t'i japësh një komande disa rreshta tekst direkt nga skripti, deri te fjala përfundimtare (zakonisht EOF). Shumë i dobishëm për të krijuar skedarë konfigurimi nga skripte.

EnglishEN

A heredoc lets you feed a command several lines of text straight from the script, until a closing word (usually EOF). Very useful for writing config files from scripts.

Si ta mendosh

Si t'i diktosh dikujt një letër të tërë deri sa thua „fund“.

Lexoje në anglisht

Like dictating a whole letter to someone until you say “the end”.

Shembull kodibash

cat > .env <<EOF
PORT=3000
DB_URL=postgres://localhost/app
EOF

Terma të lidhur