What is $0 in bash script?

Lawrence Hoeger asked a question: What is $0 in bash script?
Asked By: Lawrence Hoeger
Date created: Sat, May 8, 2021 4:07 PM
Date updated: Wed, Jun 29, 2022 10:05 AM


Top best answers to the question «What is $0 in bash script»

$0 expands to the name of the shell or shell script. This is set at shell initialization. If bash is invoked with a file of commands, $0 is set to the name of that file.

Your Answer