• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 494
  • Last Modified:

What is meant by variable=${1:-0} in shell script?

What is meant by variable=${1:-0} in shell script?
0
ANISHKA1
Asked:
ANISHKA1
1 Solution
 
ozoCommented:
      ${parameter:-word}
              If parameter is set and is non-null then substitute  its  value;
              otherwise substitute word.

       Positional parameters, parameters denoted by a number, may be  assigned
       values with the set special built-in command.  Parameter $0 is set from
       argument zero when the shell is invoked.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now