Tuesday, 15 November 2016

FAQ in UNIX

FREQUENTLY ASKED QUESTIONS

This post will help all the students to go through quick review on the questions that may occur in examination.


                                                                    MODULE 1

1. What is UNIX?Explain salient features of UNIX?

2. Explain UNIX architecture with a neat diagram?


3. Difference between internal and external commands?


4. Explain MAN command with example and its options for $man wc?


5. Demonstrate the following commands with practical examples


        1. date 2. uname 3. printf 4. cal 5. who 6. stty


6. Justify the use of /etc/passwd and /etc/shadow files?



                                                                   MODULE 2

1. Define file?Explain different categories of files?

2. With the help of a neat diagram explain parent-child relationship and file system?

3. Difference between absolute and relative pathnames?

4. Demonstrate the use of ls -l command with all its attributes?

5. Discuss relative and absolute method for changing the file permissions?

                                                                      MODULE 3

1. Explain 3 different standard redirection files?

2. Demonstrate with a neat diagram different modes of VI editor and list the commands in each mode?

3. Explain the shell interpretive cycle and wild cards with examples?

4. grep and egrep with its options?


                                                                      MODULE 4

1. What is shell programming? Write a shell script to create a menu which displays
        1. List of files 2. date 3. Process status 4. Current users of the system 5. Quit to terminal

2. Demonstrate the use of test and [ ] to evaluate the expression in shell?

3. Briefly explain the set and shift commands in unix to manipulate the positional parameters with examples?

4. Explain the following commands with examples
 1. head 2. tail 3. cut 4. paste 5. sort 6.find

5. Demonstrate the use of hard links and soft links with its advantages and disadvantages?

6. Demonstrate the for and while loop with examples?

                                                                   MODULE 5

1. Define process and explain the mechanism of process creation?

2. Write a perl script to convert temperature from centigrade to farhenheit?

3. Write a perl script to convert decimal number in to binary number?

4. Write a perl script to check whether the entered year is leap year or not using command line arguments?

5. With suitable examples explain the split and join functions in perl?

6. Explain string handling functions with examples?




Monday, 14 November 2016

PERL PROGRAMS

SIMPLE IMPORTANT PERL PROGRAMS

1. Write a Perl script to convert temperature from centigrade to Fahrenheit.

#!/usr/bin/perl
#temp.pl
                       
print("Enter temperature in centigrade:");
$ce=<STDIN>;                                       #input from the keyboard
$fa=$ce*9/5+32;
print "The temperature $ce in Fahrenheit is $fa\n");


OUTPUT:
$chmod +x temp.pl ; temp.pl
Enter temperature in centigrade: 40.5
The temperature 40.5 in Fahrenheit is 104.9

2. Write a perl script to check whether the entered year is leap year or not using command line arguments?

#!/usr/bin/perl
#leap.pl

die("YOU HAVE NOT ENTERED THE YEAR\n") if(@ARGV==0);
$year=$ARGV[0];
$last=substr($year,-2,2);
if ($last eq "00")
{
    $yesorno=($year%400==0?"certainly":"not");
}
else
{
$yesorno=($year%4==0?"certainly":"not");
}
print("$year is".$yesorno."a leap year\n");

OUTPUT:
$leap.pl
YOU HAVE NOT ENTERED THE YEAR
$leap.pl 2004
2004 is certainly a leap year
$leap.pl 1997
1997 is not a leap year

3. Write a perl script to convert decimal number to binary number
#!/usr/bin/perl
#dec2bin.pl
Foreach $number (@ARGV)
{
$original_no=$number;
Until ($number = =0)
{
$bit=$number%2;
Unshift(@bit_arr,$bit);
$number=int($number/2);
}
$binary_no=join(“ “,@bit_arr);
Print(“The binary number of $original_no is $binary_no\n”);
$#bit_arr=-1;
}

OUTPUT:
$dec2bin.pl 2 7 65 191 255
The binary number of 2 is 10
The binary number of 7 is 111
The binary number of 65 is 1000001
The binary number of 191 is 10111111

The binary number of 255 is 11111111




















Thursday, 27 October 2016

UNIX AND SHELL PROGRAMMING NOTES


UNIX AND SHELL PROGRAMMING NOTES

This blog is just to help students to get their notes in a single website. All the materials will be uploaded shortly.

1. Click the below link to download the notes
     Download

Sunday, 23 October 2016

QUESTION PAPERS

COMPUTER SCIENCE

UNIX AND SHELL PROGRAMMING QUESTION PAPERS

1. June 2012

2. Dec 2012
Download

3. Jan 2013
Download

4. Jan 2014
Download

5. July 2014
Download

6. Dec-Jan 2014
Download

7. June 2015
Download

8. July 2015
Download

Download Text Books

Download All TextBooks from 1st to 10th standard Click Here to Download http://www.ktbs.kar.nic.in/New/index.html#!/textbook