Hi guys,
I'm working on a simple bash script which collects data upon a request from a db and outputs the result into a file. The file is then uploaded to a different server for further processing.
The file name is stored in a variable, the file is created but I can't access it again. The filename is db_export_timestamp. When I print the contents (only the exports actually) of the directory I can see something like this:
Code:
ls /export/db/db_export_*
/export/db/db_export_101201_235909 /export/db/db_export_101202_000543
There are two files. The * is properly expanded by the shell. However, adding just another character, the 1, the filename no longer matches anything.
Code:
ls /export/db/db_export_1*
/export/db/db_export_1*: No such file or directory
Also accessing the file directly by its filename doesn't work.
On the other hand, using the bash TAB auto-completion feature works. The file exists then. When I rerun the same command, deleting the last character and typing it again, it doesn't work anymore.
I see no reason why the file is not found by the filesystem. There are no illegal or invisible characters, the file exists, the same variable is used to create the file as it is to access it..
Does anybody have any clue?
Thx in advance.