In one directory, I've following files,
Filename:
DOC_CACA_PCHK_20071205.txt
DOC_CACA_PCHK_TRIGGER.trg
I want to to do the following;
1. retrieve CACA from *.trg
2. Pass the above value and look for CACA*.txt
3. Retrieve the date part from CACA*.txt, ie: 20071205
Now, I want a one line command only to handle this as I cannot have any external parameters.