• Android

    Android is an operating system based on the Linux kernel, and designed primarily for touch screen mobile devices such as smart phones and tablet computers. Android is a Linux-based software system, and similar to Linux, is free and open source software. This means that other companies can use the Android operating developed by Google and use it in their mobile devices.Android gives you a world-class platform for creating apps and games for Android users everywhere, as well as an open marketplace for distributing to them instantly.

  • Welcome to Bashguru

    Linux is one of popular version of UNIX operating System. It is open source as its source code is freely available. It is free to use. Linux was designed considering UNIX compatibility. It's functionality list is quite similar to that of UNIX and become very popular over the last several years. Our Basic motive is to provide latest information about Linux Operating system.

  • Python Programming

    Python is a comparatively simple programming language, compared to c++. Although some of the benefits of c++ are abstracted away in python, they are replaced with an overall easier to learn language with many “intuitive” features. For this reason it is common and recommended by most professionals that people new to programming start with python.

  • Perl Programming

    Perl is an open-source, general-purpose interpreted programming language. Used often for CGI, Perl is also used for graphics programming, system administration, network programming, finance, bioinformatics, and other applications. The Perl languages borrow features from other programming languages including C, shell scripting (sh), AWK, and sed. They provide powerful text processing facilities without the arbitrary data-length limits of many contemporary UNIX command line tools, facilitating easy manipulation of text files.

  • Android

    Android is an operating system based on the Linux kernel, and designed primarily for touch screen mobile devices such as smart phones and tablet computers. Android is a Linux-based software system, and similar to Linux, is free and open source software. This means that other companies can use the Android operating developed by Google and use it in their mobile devices.Android gives you a world-class platform for creating apps and games for Android users everywhere, as well as an open marketplace for distributing to them instantly.

  • Welcome to Bashguru

    Linux is one of popular version of UNIX operating System. It is open source as its source code is freely available. It is free to use. Linux was designed considering UNIX compatibility. It's functionality list is quite similar to that of UNIX and become very popular over the last several years. Our Basic motive is to provide latest information about Linux Operating system.

Tuesday, October 27, 2009

Posted by venu k
23 comments | 8:41 AM
Method 1:#!/bin/bash# fact1# Finding factorial of a given number#echo "Enter a number"read numfact=1n=$numwhile [ $num -ge 1 ]do fact=`echo $fact \* $num|bc` # You can use bellow commands also # fact=$((fact*num)) # fact=`expr $fact \* $num` # But maximum integer value that bash can handle is # 9223372036854775807. # An operation that takes a variable outside these # limits will give an erroneous result. To solve this # problem store numbers as strings and use bc for math. let num--doneecho "factorial of $n is $fact"Method...

Monday, October 26, 2009

Posted by venu k
1 comment | 9:50 AM
#!/bin/bash# Usage: forloop2.sh or forloop2.sh number# Example using for loop# Prints following format# *# * *# * * *# * *# *n=${1-10} # If command line argument not supplied default is 10t=`expr $((2*$n - 1 ))`a=$nb=$(($a+1))for (( i=1 ; i<=$n ;i++ ))do echo -e -n "\033[47m" a=$(($b-1)) b=$a k=1for (( j=1 ; j<=$t ; j++ )) do if [ $j -eq $a ] then echo -e "\033[43m * \033[47m\c" if [ $k...

Saturday, October 10, 2009

Posted by venu k
8 comments | 9:55 AM
Defining the Shell TypeTo make a bash script crate a new file with a starting line like:#!/bin/bash It is important that the path to the bash is proper and first two characters must be “#!” . The shell from which you are starting the script will find this line and hand the wholescript over to bash. Without this line the script would be interpreted by the same type of shell as the one, from whichit was started.But since the syntax is different for all shells, it is necessary to define the shell with that line.Some typical interpreters...

Wednesday, October 7, 2009

Posted by venu k
4 comments | 8:19 AM
#!/bin/bash # Usage: script.sh number# A for loop example produces following output## *# * *# * * *# * * * *# * * * * *#Method1c=1n=$1echo -e "\033[47m\c" #colourizing outputfor ((row=1;row<=n;row++))do for ((i=row;i<n;i++)) do echo -n ' ' done for ((k=1;k<=c;k++)) do if [ $((k%2)) -eq 0 ] then ...
Posted by venu k
2 comments | 7:58 AM
A 'for loop' is a bash programming language statement which allows code to be repeatedlyexecuted. A for loop is classified as an iteration statement i.e. it is the repetition of a processwithin a bash script.For example, you can run UNIX command or task 5 times or read and process list of files usinga for loop. A for loop can be used at a shell prompt or within a shell script itself.for loop syntaxNumeric ranges for syntax is as follows:for VARIABLE in 1 2 3 4 5 .. Ndo command1 command2 commandNdoneExamples:#!/bin/bahfor i in 1 2...
Posted by venu k
3 comments | 6:10 AM
#!/bin/bash # Usage: scriptname argument # Here argument is height of pyramid # Output would be pyramid pattern of stars # 0 * # 1 *** # 2 ***** # 3 ******* # 4 ********* # 5 *********** # 6 ************* # . *************** # . ***************** # . ******************* # ...
Posted by venu k
6 comments | 5:35 AM
#!/bin/bash# Usage: scriptname argument# Here argument is height of pyramid# Output would be pyramid pattern of stars# 0 *# 1 ***# 2 *****# 3 *******# 4 *********# 5 ***********# 6 *************# . ***************# . *****************# . *******************# n-1 *********************#...