How to initialize a directory size to a variable??
Answers were Sorted based on User's Feedback
Answer / damodar rao
#!/bin/bash
echo 'enter the directory name with path Ex: /home/damoar: ';
read $x;
$size = `du -h $x`;
echo 'size of a given directory $x is : `$size` ';
:wq
Is This Answer Correct ? | 3 Yes | 0 No |
What shell is bin sh?
Explore about environment variables?
What lives in a shell?
How to make userdefined variables to available for all other shells?
What is a shell made of?
What is the first line in a shell script?
Is shell scripting a programming language?
I want to read all input to the command from file1 direct all output to file2 and error to file 3, how can I achieve this?
what do u mean by $#,$* in unix programming?
How will I insert a line "abcdef" at every 100th line of a file?
How do I set bash as default shell mac?
What is shell and shell script?