03-14-2014
1,
0
Join Date: Mar 2014
Last Activity: 2 July 2014, 4:39 AM EDT
Posts: 1
Thanks Given: 0
Thanked 0 Times in 0 Posts
Hi, I need you help.
I am new to bash. But I need read a snippet of script. I saw some expression like this below. I can figure it out by coding a snippet.
But I fount that the curly bracket("{}") have so much use. Could you please give some tutorial about the curly bracket, or some sort of summary about it?
I will really appreciate it.
Thank you in advance.
1. ${1%%[0-9]*} It means to intercept $1 from the place digits begins, and assign the non-digits to $1. If $1 starts with num then just assign null to $1
2. ${{1//[^0-9a-zA-Z_]/_} This means to replace all elements if it is not digits, alphabets or underscore with underscore.