Visits

[+/-]
Today:
Yesterday:
Day before yesterday:
334
517
481

+36
This week:
Last week:
Week before last week:
2193
2962
3860

-898

Last month:
Month before last month:
8451
15650
24339

-8689

Visitor Data

IP ADDRESS
38.107.179.212
-
Location
United States
-
Browser
Unknown Browser
-
Operating System
Unknown Operating System


   
Add to: JBookmarks Add to: Bookmarks.cc Add to: Digg Add to: Reddit Add to: Upchuckr Add to: StumbleUpon Add to: Slashdot Add to: Blogmarks Add to: Technorati Add to: Newsvine Add to: Blinkbits Add to: Smarking Add to: Spurl Add to: Google Information
BASH variable offset and string operators

Bash Variable Offset and String Operators

$ r="this is stuff"
$ echo ${r:3}
$ echo ${r:5:2}

Note, ${varname:offset:length}


${varname:?message}  If varname exist and isn't null return value, else,
print var and message.

$ r="new stuff"
$ echo ${r:? "that's r for you"}
new stuff
$ unset r
$ echo ${r:? "that's r for you"}
bash: r:  that's r for you

${varname:+word}    If varname exist and not null return word. Else, return null.

${varname:-word}    If varname exist and not null return value. Else, return word.

Working with arrays in bash - bash arrays.

$ unset p
$ p=(one two three)

$ echo -e "${p[@]}"
one two three

or

$ echo -e "${p[*]}"
one two three

$ echo -e "${#p[@]}"
3

$ echo -e "${p[0]}"
one

$ echo -e "${p[1]}"
two