
Thursday, January 6, 2011
Posted by venu k
25 comments | 1:29 PM

#!/bin/bash# SCRIPT : menu_dialog.sh# PURPOSE : A menu driven Shell script using dialog utility# which has following options:# Display Today's Date and Time.# Display calendar.# Delete selected file from supplied directory.# List of users currently logged in# Disk Statistics# Exit################################################################################ Checking...
Monday, January 3, 2011
Posted by venu k
28 comments | 11:53 AM
Quicksort is a good example of the divide and conquer strategy forsolving problems. In quicksort, we divide the array of items to besorted into two partitions and then call the quicksort procedure recu-rsively to sort the two partitions, ie we divide the problem into twosmaller ones and conquer by solving the smaller onesQuicksort recursive algorithm:1 Select an element (called as pivot) x(p) of x .2 Divide x into two batches x1 and x2 so that all entries of x1 are < x(p) and all entries of x2 are > x(p). all entries of x3 are...
Posted by venu k
8 comments | 11:23 AM
Binary search works by comparing an input value to the middle elementof the array. The comparison determines whether the element equals theinput, less than the input or greater. When the element being comparedto equals the input the search stops and typically returns the posit-ion or number of searches of the element. If the element is not equalto the input and the element at the middle point is greater than theinput being searched, the current middle point becomes the new highpoint and the array is cut in half again and re-tested. If the elementat...
Posted by venu k
11 comments | 3:28 AM
#!/bin/bash# SCRIPT : linearsearch.sh# USAGE : linearsearch.sh# PURPOSE: Searches given number in a list.# \\\\ ////# \\ - - //# @ @# ---oOOo-( )-oOOo---# A variation of Here Document permits "commenting out" data block.: <<DATABLOCK In computer science, linear search or sequential search is a methodfor finding a particular value in a list, that consists in checkingevery one of its elements, one at a time and in sequence, until thedesired one is...
Sunday, January 2, 2011
Posted by venu k
14 comments | 8:19 AM

Wish You a Happy New Year To All My Friends If you don't know shell color codes, read bellow article first.How to colorize shell scripts#!/bin/bash# SCRIPT: happynewyear.sh# PURPOSE: Prints Happy new year 2011 on screen.# \\\\ ////# \\ - - //# @ @# ---oOOo-( )-oOOo---################################################################################ ...
Subscribe to:
Posts (Atom)