I am trying to strip wildcards from user input text in a c-shell script.
I realize that the shell automatically expands all wildcards prior to storing the data.
Is there a way to isolate the non-wildcard portion of user input?
I also realize that c-shell is not the best shell for scripting. Unfortunately, the script is already written and I'm merely modifying.
man date
, and incorporate a timestamp into the filrename, IMHO.*.txt
may match a file called*.txt
(literally) and other files with the.txt
filename suffix. It is in that case difficult to know whether the original string was a wildcard or a valid file name. The script needs to be specific with what type of data it expects from the user (e.g. "only filenames"), and then assume that the user follows those rules.globbing
. For do it,set -f
can help you.