LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   * should represent any characters (http://www.linuxquestions.org/questions/programming-9/%2A-should-represent-any-characters-211725/)

suchi_s 07-31-2004 12:18 AM

* should represent any characters
 
exec < ~/ANYMEDIA/ERROR/`date '+%Y%m%d'`_ *.log


* should represtnt any characters..
but it ids not working

Tinkster 07-31-2004 12:40 AM

It does ... but what do you expect to happen?


Cheers,
Tink

suchi_s 07-31-2004 01:09 AM

it should look for a file named ~/ANYMEDIA/ERROR/`date '+%Y%m%d'`_ 56:8:89.log
which actuaaly exists in the path mentioned
it gives an error

/home/amarvir/ANYMEDIA/ERROR/20040731_\*.log: file not found

Tinkster 07-31-2004 02:10 AM

I'm jumping to conclusions here, but you're using bash,
and trying to feed log-files to the bash-builtin exec in
an ambiguous redirect?

What are you trying to achieve?


Cheers,
Tink

suchi_s 07-31-2004 03:03 AM

.log ig the extensoion which i have given to file..
it has nothin to do with log..
it has to search for the file name where 8 can be any characters..
but it prints the start as it is..in the file name when used in the script..
but if i write this in shell prompt it works fine

Cedrik 07-31-2004 09:23 AM

Try to not put space between last char (_) and *.log

Tinkster 07-31-2004 03:50 PM

Just had another look at the error message ...
If the file doesn't have a \ in its name, and
you're not trying to escape a space you forgot
to copy and paste it will obviously fail ;)


Cheers,
Tink


All times are GMT -5. The time now is 04:25 PM.