Problem With Shell Script Variable Usage
Gidday, shell scripting newbie, and having real problem with below:
DUMMY=$MYFILE | cut -c 11- | cut -c -8 | tr -d -
If I do:
echo $MYFILE | cut -c 11- | cut -c -8 | tr -d -
I get the result I want (a file in format of <name><yyyy>-<mm>-<dd>.zip cut down to just yymmdd); but not if I try to set it as a variable ...
Is it something stupid I'm doing, or is it more complicated than I thought?
Any help would be greatly appreciated.