Skip to content

Useless use of echo #292

Closed
Closed
@Strahinja

Description

@Strahinja

One of the examples on the front page,

file=$(echo `basename "$file"`)

is a useless use of echo, and could be rewritten as

file=$(basename "$file")

or, just using parameter expansion in POSIX shell, without the need for an external program:

file=${file#*/}; file=${file%.*}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions