Which command can extract just number from a line or text file?
Hi people,
I'm using du command:
du folder_name
and that gives me the result, for example:
8 folder_name
I wonder- how can I get just that 8 (that number) without the name of folder next to it?
(I want to do that because I want to assign that value to a variable in a script.)
Or if I write the result of command in a text file:
du folder_name > some_file, how can I get that number (in this case 8)from that file?
|