Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 3

Displaying posts with tag: shell scripting (reset)

Change management of database scripts
+1 Vote Up -0Vote Down

In this post I’m going to discuss the strategy used by our team to manage the changes taking place in the database. Most of the time we as developers mainly focus on implementing the feature and put less effort on manage the database changes. For instance individual might not straight away see the importance in […]

getopts in shell script
+0 Vote Up -0Vote Down

getopts
The getopts command simplifies the task of validating and parsing command line options and arguments for your shell scripts.

Syntax:

getopts <optstring name> [arg...]

Example:

Step1: First I define all my option holding variables.

ListFiles=0
MoveFiles=0
email=""

Step2: While loop.

The following while statement loops through all the options and sets them to the corresponding variable. getopts returns true while there are options to be processed. …
















  [Read more...]
GET SIZE OF DIRECTORY (EXCLUDE SUBDIRECTORY) IN UNIX
+0 Vote Up -0Vote Down

We all know du command to get the size of a directory. But the problem is when you use "du <directory name>" it will give you the list of all subdirectory including the directory you want with size.

Bt what if i only want the size of directory which i have passed as an argument and not all the subdirectory?

In that senario we can use:

du -sh <directory name>                              









  [Read more...]
Showing entries 1 to 3

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.