Skip to content

[Shell script]: parameters substitution #38

Description

@zhoukaidev
#!/bin/bash

PATH=`pwd`
FILE=$PATH/hello.app

NAME=${FILE##*/}
echo $NAME

Understand the ${FILE##*/} syntax

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