Sponsored Content
Top Forums Shell Programming and Scripting what does ${VARIABLE:-0} stand for? Post 302381829 by ahmad.diab on Monday 21st of December 2009 02:48:19 AM
Old 12-21-2009
Explanation:-

Code:
${parameter-default}, ${parameter:-default}
If parameter not set, use default.

echo ${username-`whoami`}
# Echoes the result of `whoami`, if variable $username is still unset.

${parameter-default} and ${parameter:-default} are almost
equivalent. The extra : makes a difference only when parameter has been declared,
but is null.

SmilieSmilieSmilieSmilie
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

No stand-by, keep on

How do you or what is the setup to keep the (server) up from shutting down? It is not server yet but it might very likely become to serve few clients. But, once I get in in the morning its off. It's Sparc, Solaris 8 and I would like to keep it running over night but once it is not attended it... (2 Replies)
Discussion started by: softarch
2 Replies

2. UNIX for Dummies Questions & Answers

OEM - what does this abbreviation stand for?

Just saw this OEM abbreviation during installation of Solaris 8. I'm curious to know what the letters stand for and what OEM actually is. (3 Replies)
Discussion started by: Kanu77
3 Replies

3. UNIX for Dummies Questions & Answers

stand alone wants to boot off network

Hello Everybody, I have a Sun Sparc 5 that used to have Solaris 8 on it. I wanted to build my skills at installing the software and then all went wrong for me. This computer is a stand alone, not networked at all. So I got my hands on Solaris 9 Sparc version, I went through the install and at... (1 Reply)
Discussion started by: oilpainter69
1 Replies

4. Shell Programming and Scripting

Can under stand the script

Hi all, I am working on following script which is already working and i am trying to understand but could not can any body help me in follwoing script. I understand that it deletes record from tables. using DB2 import from /dev/null. I dont know where in second portion it loads the data in to... (0 Replies)
Discussion started by: sam71
0 Replies

5. Programming

How to under stand the C code

#include <stdio.h> main(t,_,a) char *a; {return!0<t?t<3?main(-79,-13,a+main(-87,1-_, main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a )&&t == 2 ?_<13 ?main ( 2, _+1, "%s %d %d\n" ):9:16:t<0?t<-72?main(_,... (4 Replies)
Discussion started by: brain_full
4 Replies

6. IP Networking

What does 'AF' of AF_INET stand for ?

as title. and how is it different from PF_INET ? also, any one knows sin_family , sin_port , sin_addr ..etc ? why are they called 'sin' ? finally, htons() host to network short , htonl() host to network long , ntohs() network to host short , ntohl() network to host long. why would... (6 Replies)
Discussion started by: trapeze
6 Replies

7. HP-UX

Stand-alone start-up of HP-UX11i

I have a HP-UX11i machine on the network and that works fine. But, now i want to start this machine without network connection? How must i do this? Because, if i pull out the network cable it will not boot. (5 Replies)
Discussion started by: bavl
5 Replies

8. Shell Programming and Scripting

What does the -z expression stand for?

What does - z and {} means if ; then echo "ERROR: \$ARBORDBU environment variable is not set\n" (8 Replies)
Discussion started by: rafa_fed2
8 Replies

9. IP Networking

Network stand still

**this was posted in another forum I suspect wrong one moved here **:confused: Hello all. Let me qualify my question by saying that I am struggling with how to ask the question I am semi green but have no issue reading up if pointed in the right direction. Please be gentle! A RHEL server 6.2.... (4 Replies)
Discussion started by: rsheikh01
4 Replies
PS_SHOW2(3)						     Library Functions Manual						       PS_SHOW2(3)

NAME
PS_show2 -- Output text with given length SYNOPSIS
#include <pslib.h> void PS_show2(PSDoc *psdoc, char *text, int xlen) DESCRIPTION
Output a text at the current text position. No more than xlen chars will be shown. The function will issue an error if no font was set before with PS_setfont(3). PS_show2() evaluates the following parameters and values as set by PS_set_parameter(3) and PS_set_value(3). textx The x coordinate for text output. texty The y coordinate for text output. charspacing (value) Distance between two consecutive glyphs. If this value is unequal to zero then all ligatures will be resolved. Values less than zero are allowed. kerning (parameter) Setting this parameter to `false' will turn off kerning. Kerning is turned on by default. ligatures (parameter) Setting this parameter to `false' will turn off the use of ligatures. Ligatures are turned on by default. underline (parameter) Setting this parameter to `true' will turn on underlining. Underlining is turned off by default. overline (parameter) Setting this parameter to `true' will turn on overlining. Overlining is turned off by default. strikeout (parameter) Setting this parameter to `true' will turn on striking out. Striking out is turned off by default. SEE ALSO
PS_show(3), PS_continue_text2(3), PS_setfont(3) AUTHOR
This manual page was written by Uwe Steinmann uwe@steinmann.cx. PS_SHOW2(3)
All times are GMT -4. The time now is 06:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy