wafflesausage |
03-10-2011 12:22 PM |
Quote:
Originally Posted by corp769
(Post 4285083)
Show me the output of "du -k $aFILE" and "du -k $aFILE | sed s/$aFILE//g" if you could so I can see what you are talking about. I would rather see the output on your end. Of course replace aFILE with the actual file and so forth...
|
Actually, I switched that line so it now reads
Code:
du -k $aFILE | awk '{print $1}'
which prints only the size of the specified file in kilobytes (without the name as it did before). I still get the error that states
Code:
set: Variable name must begin with a letter.
SIZETOMON: Undefined variable.
It was my understanding that in shell scripting that one doesn't have to specify whether a variable is a string, float, integer, etc., but that doesn't seem to be the case here. And just to clarify, aFILE is a variable that is specified by the user which the script "asks for" on line 3.
|