Re: Bash: Asterisk reading problem
- From: Buzzbomb <buzzbomb@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 07 Jul 2005 06:29:59 GMT
Pan wrote:
Without seeing your script its difficult to say precisely but it sounds like its probably a quoting problem.Hi everybody
I've been having significant problems trying to read the asterisk character from a set of data files. I have a task of parsing a large number of HTML files and then exporting the required text information to independent files. I had some initial problems at this, but it's working pretty well now. However, I've noticed that a rare number of files contain the asterisk symbol, which is causing problems with the exporting process. The problem begins when I read an interpretation of the HTML page into a Bash variable. The asterisk symbol in the variable is substituted into a list of all files in the current directory, which is not the desired behaviour :) I simply want the asterisk symbol exported instead.
I have fiddled around with various ideas to fix it without success. It was fairly easy to convert it to another symbol which resolves the problem, but I would prefer to keep the asterisk characters if at all possible. But nothing I've tried seems to change the situation and I always seem to get the substituted file list inside the Bash variable and therefore in the exported data.
I've run into a wall at this stage. Does anybody have any idea how I could fix this?
Thanks
Regards,
Pan
The "*" is a filename wildcard to bash - hence the substitution. You will also run into similar problems with other shell metacharacters, ()?[]$\{}, but under more specific circumstances.
B. .
- References:
- Bash: Asterisk reading problem
- From: Pan
- Bash: Asterisk reading problem
- Prev by Date: Re: EU vote on patents
- Next by Date: Re: EU vote on patents
- Previous by thread: Bash: Asterisk reading problem
- Next by thread: Re: Bash: Asterisk reading problem
- Index(es):
Relevant Pages
|