Skip to content

Lab: Îmbunătățirea lucrului în linia de comandă - Information for {} is wrong or incomplete #27

@elena19m

Description

@elena19m

The explanations for {} [1] are wrong or incomplete. From the lab [1], I get that {} are a form of OR.
From lab: "... folosim sintaxa {} pentru a defini o listă de cuvinte ... care pot fi folosite în înlocuire. Această sintaxă înlocuiește exact un cuvânt din lista oferită" + "Citim expresia {Downloads,Music}: în locul acestei expresii poate să existe cuvântul Downloads sau cuvântul Music."

In reality, {} represent expansion of terms. Ex: touch file{1,2,3,4,5}.txt expands to touch file1.txt file2.txt file3.txt file4.txt file5.txt. And ls {Downloads,Music} expands to ls Downloads Music.
See "Brace Expansion" from [2].

Please correct or improve the text that refers to {}.

[1] https://ocw.cs.pub.ro/courses/uso/laboratoare/laborator-05#sintaxa_speciala1
[2] https://linux.die.net/man/1/bash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions