Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to initialize a directory size to a variable??

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you find out What is your shell?

1098


What shell is bin sh?

1016


What is a scripting language simple definition?

1155


How do I open the shell prompt?

1244


What is the way to do multilevel if-else's in shell scripting?

1348


How can we find the process name from its process id?

1221


What is the syntax of "nested if statement" in shell scripting?

1141


Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.

1323


What is computer cli?

952


What is inside a seashell?

1185


What is the meaning of $1 in shell script?

1158


What can scripts do?

1165


What is k shell?

1003


What are the disadvantages of shell scripting?

1262


Explain about debugging?

1078