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 |
How would you replace the n character in a file with some xyz?
How to initialize a directory size to a variable??
Give some situations where typing error can destroy a program?
What is the lifespan of a variable inside a shell script?
Why is shell scripting important?
What are the four fundamental components of every file system on linux?
What is the fastest scripting language?
What is the way to do multilevel if-else's in shell scripting?
Hello all, This is my assignment on shell scripting, can anyone help me regarding this ? Create a shell script which connects to the database In second shell script include the first script for the DB connection Create a table (PRADEEP_DATA) with 2 columns (name, value) In Third shell script include the first script for the DB connection And insert/delete the values from the Table, by accepting input from the user This functionality should be a menu driven Program: 1) Insert to the database a. Name b. value 2)Delete from the database a.Name b.value Exception handling needs to be taken care.
Explain about return code?
What does echo mean in scripting?
Is it possible to substitute "ls" command in the place of "echo" command?