MicrosoftDocs / azure-docs-cli

Repository used to store content for the docs.microsoft.com content for the Azure CLI
https://docs.microsoft.com/cli/azure/
Creative Commons Attribution 4.0 International
209 stars 474 forks source link

echo does not work and produces non functional content. #4448

Closed rbreunung closed 1 month ago

rbreunung commented 3 months ago

Type of issue

Code doesn't work

Feedback

I tried the following from your documentation:

echo "Types: deb
URIs: https://packages.microsoft.com/repos/azure-cli/
Suites: ${AZ_DIST}
Components: main
Architectures: $(dpkg --print-architecture)
Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources

it didn't work well for me as it did not recognize line breaks or the file content. I would recommend to write the following instead:

printf "Types: deb \n\
URIs: https://packages.microsoft.com/repos/azure-cli/ \n\
Suites: ${AZ_DIST} \n\
Components: main \n\
Architectures: $(dpkg --print-architecture) \n\
Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources

It solves 2 issues:

  1. the line breaks get recognized by the command.
  2. The line breaks remain preserved in the target file.

Alternatively you could echo the content line by line into the target file.

Page URL

https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux

Content source URL

https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/docs-ref-conceptual/install-azure-cli-linux.md

Author

@jiasli

Document Id

a3f27295-3e2e-a36d-02c2-8897295fc443

PesalaPavan commented 3 months ago

@rbreunung Thanks for your feedback! I've assigned this issue to the author who will investigate and update as appropriate.

dbradish-microsoft commented 2 months ago

Full link to conceptual tab and H2: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt#option-2-step-by-step-installation-instructions

dbradish-microsoft commented 1 month ago

@rbreunung, The Azure CLI is supported in the distributions listed in Before you begin. I retested the Option 2: Step-by-step installation instructions in Debian (bookworm) and Ubunto (22.04.3 LTS / Jammy Jelyfish). Both ran the install script without error.