Understanding bash shell code

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Understanding bash shell code

vamsi
I am not able to understand below line in unix bash shell.Could anyone explain what it will do

result="${path1}/*${path2}*${var1}*wssreligibleitem*.csv"

path1 is defined and it is a directory path
path1 is defined and it is a directory path
var1 is defined and it holds string value
Basically i did not understand the importance of /*,*
Reply | Threaded
Open this post in threaded view
|

Re: Understanding bash shell code

Guru
Administrator
It looks like the path2 variable is going to contain only a part of the directory name. Hence, using * before and after path2.
Reply | Threaded
Open this post in threaded view
|

Re: Understanding bash shell code

vamsi
Thanks for reply and there is minor mistake in my orginal post.Please find below

I am not able to understand below line in unix bash shell.Could anyone explain what it will do
[code]
result="${path1}/*${var1}*${var2}*wssreligibleitem*.csv"

path1 is defined and it is a directory path
var1 is defined and it holds string value like abc
var2 is defined and it holds string value like cde
Basically i did not understand the importance of /*