•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 422,380 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,704 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 2080 | Replies: 2
![]() |
•
•
•
•
Originally Posted by zkjian517
when i read linux boot scripts, i often meet this expression: ${1:-}. i can't understand it. what's more, i don't understand this condition: [ -z "${1:-}" ] too. anyone can help me ? thanks!!!
[quote man ksh]
${parameter:-word}
Use Default Values. If parameter is unset or null,
the expansion of word will be substituted; other-
wise, the value of parameter will be substituted.
-z string True, if length of string is zero.
[/code]
vlad
+-----------------------------------+
| #include <disclaimer.h> |
+-----------------------------------+
+-----------------------------------+
| #include <disclaimer.h> |
+-----------------------------------+
doing 'man ksh' yields:
•
•
•
•
Originally Posted by vgersh99
••••Originally Posted by man ksh${parameter:-word}
Use Default Values. If parameter is unset or null,
the expansion of word will be substituted; other-
wise, the value of parameter will be substituted.
-z string True, if length of string is zero.
vlad
+-----------------------------------+
| #include <disclaimer.h> |
+-----------------------------------+
+-----------------------------------+
| #include <disclaimer.h> |
+-----------------------------------+
![]() |
•
•
•
•
•
•
•
•
DaniWeb Shell Scripting Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- What's the meaning of the "return" here? (C++)
- google "keyword" question (Search Engine Optimization)
Other Threads in the Shell Scripting Forum
- Previous Thread: Linux Shell Script
- Next Thread: web page statistics - my first bash script


Linear Mode