What does $1 do in bash?

1
Irwin Schultz asked a question: What does $1 do in bash?
Asked By: Irwin Schultz
Date created: Sat, Jul 31, 2021 1:00 AM
Date updated: Sat, Jul 2, 2022 4:03 AM

Content

Top best answers to the question «What does $1 do in bash»

$1 is the first command-line argument passed to the shell script. Also, know as Positional parameters… $0 is the name of the script itself (script.sh) $1 is the first argument (filename1) $2 is the second argument (dir1)

Your Answer