sreeni
Member level 1
$type = ( -d "$path\\$entry" ) ? "dir" : "file";
It is a part of a script. What the script does is it will serch the specified directory and list the all the contents of it including files and directories with type specified whether it is directory or file.
The above line of script is intented to set the type as "dir" or "file".
My doubt is how this will be done?
I couldn't understand -d "$path\\$entry"
$path is the path of a directory and a $entry is a patricular file in that direcotry
It is a part of a script. What the script does is it will serch the specified directory and list the all the contents of it including files and directories with type specified whether it is directory or file.
The above line of script is intented to set the type as "dir" or "file".
My doubt is how this will be done?
I couldn't understand -d "$path\\$entry"
$path is the path of a directory and a $entry is a patricular file in that direcotry