mancubus
Member
From: Belgium
|
posted 2003-06-11 11:27:58 |
Reply -Delete |
Not exactly:
I have a variable (inside my script) which represents a string read from a file; the variable (the string) represents the name of a file, of a directory, of a set of files or directory;
example:
$file = /usr/1353sh/AS/conf/*
or $file = /usr/1353sh/AS/conf/?aram.cfg
or $file = /usr/1353sh/AS/conf/[a-zA-Z]21.cfg
i.e. the name can contain wildcards;
I need to discover if the wildcards are at the end of the file name or are in the middle (i.e. they refer to directories)
e.g. /usr/1353sh/AS/*/param.cfg
Therefore I have to scan the string and to look for the wildcards, if the wildcards are before the "/" then I suppose that they refer to directory, not to the file name.
| |