lps assignments linux questions

Upload: siddu

Post on 05-Jul-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/15/2019 LPS Assignments linux questions

    1/14

      IITM NPTEL Seer IESA Project

    Assignments

    Assignment –  1

    AIM OF THE ASSIGNMENT:

    Login to the LINUX OS, Execution of Commands

    ASSIGNMENT DESCRIPTION:

    a.  Explain and execute the following commands with the options available to it

    i.  List the command with and without hidden file, sort and long format

    ii.  Pwdiii.  Create the directory TEST; change the current working directory to it, create six

    directories namely A1, A2,A3,A4,A5,A6.

    iv.  List the above directories, remove the A6 directory and show it.

    v.  Cat

    vi.  Diff between mv and cp

     b. 

    i.  Display the man page for ls command and redirect it to a text file called “input.txt”

    and use the commands less, more and cat on the file.

    Display the first 10 lines, last 6 lines of the file “input.txt” using Linux commands

    TIME LINES OF THE ASSIGNMENT: The duration of the assignment is 1 week.

    DELIVERABLES FOR THE ASSIGNMENT: A document or an excel sheet describing your analysis, understanding and conclusions on the results

    EVALUATION CRITERIA: The assignment is evaluated for 10 marks.

    5 Marks are awarded for the quality of the assignment deliverables5 Marks are awarded for the your analysis and presentation

  • 8/15/2019 LPS Assignments linux questions

    2/14

      IITM NPTEL Seer IESA Project

    SKILL MATRIX 

    Remember Understand Apply Analyze Evaluate Create

    Factual

    Knowledge

    Conceptual

    Knowledge

    Procedural

    Knowledge

    MetaCognitive

    Knowledge

  • 8/15/2019 LPS Assignments linux questions

    3/14

      IITM NPTEL Seer IESA Project

    Assignment - 2

    AIM OF THE ASSIGNMENT:

    Writing scripts in LINUX

    ASSIGNMENT DESCRIPTION:

    Create a subdirectory Moscow inside Russia Create a new subdirectory Beijing under China. Create a

    file with the name “lps.txt” inside the Beijing. Write a script in Linux to copy the file in your

    Moscow subdirectory under Russia to Beijing subdirectory under China. Include an if statement to let

    you know if the copy was made successfully 

    TIME LINES OF THE ASSIGNMENT: The duration of the assignment is 1 week.

    DELIVERABLES FOR THE ASSIGNMENT: 

    A document or an excel sheet describing your analysis, understanding and conclusions on the results

    EVALUATION CRITERIA: The assignment is evaluated for 10 marks.

    5 Marks are awarded for the quality of the assignment deliverables5 Marks are awarded for the your analysis and presentation

    SKILL MATRIX 

    Remember Understand Apply Analyze Evaluate Create

    Factual

    Knowledge

    Conceptual

    Knowledge

    Procedural

    Knowledge

    MetaCognitive

    Knowledge

  • 8/15/2019 LPS Assignments linux questions

    4/14

      IITM NPTEL Seer IESA Project

    Assignment - 3

    AIM OF THE ASSIGNMENT:

    PERL scripting on scalars, arrays, strings 

    ASSIGNMENT DESCRIPTION:

    a.  Write a PERL script to print “Welcome to the PERL world” using 

    a.  Simple print command

     b.  Assign the given string to a variable and print it by using that variable

    c.  Assign the given string to variable at run-time and print it.

     b.   Notice the differences among following statement in which context they are used?

    a.   print @food; print "@food"; print @food."";

    c.  Write a program in perl to print the following using operators

    a.  81 plus 9 is 90

     b.  81 minus 9 is 72

    c.  81 times 10 is 810

    d.  81 divided by 9 is 9

    d.  Write a perl code for adding two strings together and display it as another string with an

    example.

    TIME LINES OF THE ASSIGNMENT: The duration of the assignment is 1 week.

    DELIVERABLES FOR THE ASSIGNMENT: A document or an excel sheet describing your analysis, understanding and conclusions on the results

    EVALUATION CRITERIA: The assignment is evaluated for 10 marks.5 Marks are awarded for the quality of the assignment deliverables

    5 Marks are awarded for the your analysis and presentation

  • 8/15/2019 LPS Assignments linux questions

    5/14

  • 8/15/2019 LPS Assignments linux questions

    6/14

      IITM NPTEL Seer IESA Project

    Assignment - 4

    AIM OF THE ASSIGNMENT:

    Pattern matching and Substitutution

    ASSIGNMENT DESCRIPTION:

    a.  Write a script that asks for your age. If the number entered is your age, the message

    should say, "Good guess." If the number is not your age, the message should say

    "Incorrect guess, the age is xx" . Where xx is the correct age. Run the script two times

    - once with the correct age and once without.

     b. 

    Write a PERL script on string substitution

    TIME LINES OF THE ASSIGNMENT: The duration of the assignment is 1 week.

    DELIVERABLES FOR THE ASSIGNMENT: A document or an excel sheet describing your analysis, understanding and conclusions on the results

    EVALUATION CRITERIA: The assignment is evaluated for 10 marks.

    5 Marks are awarded for the quality of the assignment deliverables5 Marks are awarded for the your analysis and presentation

  • 8/15/2019 LPS Assignments linux questions

    7/14

      IITM NPTEL Seer IESA Project

    SKILL MATRIX 

    Remember Understand Apply Analyze Evaluate Create

    Factual

    Knowledge

    Conceptual

    Knowledge

    Procedural

    Knowledge

    MetaCognitive

    Knowledge

  • 8/15/2019 LPS Assignments linux questions

    8/14

      IITM NPTEL Seer IESA Project

    Assignment - 5

    AIM OF THE ASSIGNMENT:

    Reading and writing to a Text file

    ASSIGNMENT DESCRIPTION:

    a.  Write a Perl program to read a text file "input.txt" and generate as output to another

    file "output.txt""

     b.  Write a Perl program to read a text file "input.txt" and search for a string "Welcome"

    and Print it if it matches.

    c.  Write a Perl program to read a text file "input.txt" and search for a string "Welcome"

    and Substitute it with "Hello" and print it.

    TIME LINES OF THE ASSIGNMENT: 

    The duration of the assignment is 1 week.

    DELIVERABLES FOR THE ASSIGNMENT: A document or an excel sheet describing your analysis, understanding and conclusions on the results

    EVALUATION CRITERIA: The assignment is evaluated for 10 marks.5 Marks are awarded for the quality of the assignment deliverables5 Marks are awarded for the your analysis and presentation

    SKILL MATRIX 

    Remember Understand Apply Analyze Evaluate Create

    Factual

    Knowledge

    Conceptual

    Knowledge

    Procedural

    Knowledge

    MetaCognitive

    Knowledge

  • 8/15/2019 LPS Assignments linux questions

    9/14

      IITM NPTEL Seer IESA Project

    Assignment - 6

    AIM OF THE ASSIGNMENT:

    Sort, Shift, Unshift, Push, Pop operation on Arrays

    ASSIGNMENT DESCRIPTION:

    a. Write a Perl program segment to sort a string array of (red blue green black) in the Descending

    order

    b. Remove the first string from the list and add "white" as the first string into the list using Shift and

    unshift commands. Then display the contents of the array.

    c. Then remove the last string from the list and add "grey" as the last string into the list using Pop

    and push commands. Then display the contents of the array

    TIME LINES OF THE ASSIGNMENT: 

    The duration of the assignment is 1 week.

    DELIVERABLES FOR THE ASSIGNMENT: A document or an excel sheet describing your analysis, understanding and conclusions on the results

    EVALUATION CRITERIA: The assignment is evaluated for 10 marks.

    5 Marks are awarded for the quality of the assignment deliverables5 Marks are awarded for the your analysis and presentation

    SKILL MATRIX 

    Remember Understand Apply Analyze Evaluate Create

    Factual

    Knowledge

    Conceptual

    Knowledge

    Procedural

    Knowledge

    MetaCognitive

    Knowledge

  • 8/15/2019 LPS Assignments linux questions

    10/14

      IITM NPTEL Seer IESA Project

    Assignment - 7

    AIM OF THE ASSIGNMENT:

    Writing Hashes and performing operation on hashes 

    ASSIGNMENT DESCRIPTION:

    a.  Write a hash variable with the name myhash(keys and values of your hash is your own

    choice) and extract keys, values from the myhashusing the operation available on hashes and

    also remove any key-value pair from the hash.

     b.  Write a Perl program to read the names and their corresponding phone numbers from Standard

    input and write them to a file using hash keys.

    c.  Write a Perl program to search for the phone number of a person from the hash list and Print his

    name and number if it is found

    TIME LINES OF THE ASSIGNMENT: The duration of the assignment is 1 week.

    DELIVERABLES FOR THE ASSIGNMENT: A document or an excel sheet describing your analysis, understanding and conclusions on the results

    EVALUATION CRITERIA: The assignment is evaluated for 10 marks.5 Marks are awarded for the quality of the assignment deliverables5 Marks are awarded for the your analysis and presentation

    SKILL MATRIX 

    Remember Understand Apply Analyze Evaluate Create

    Factual

    Knowledge

    Conceptual

    Knowledge

    Procedural

    Knowledge

    MetaCognitive

    Knowledge

  • 8/15/2019 LPS Assignments linux questions

    11/14

      IITM NPTEL Seer IESA Project

    Assignment - 8

    AIM OF THE ASSIGNMENT:

    Write a Tcl script for the following inputs 

    ASSIGNMENT DESCRIPTION:

    a.  Construct an array {1 10 2 20 a 30 b 40} in Tcl and store it in a variable called as “new” and

     print the array.

     b.  Print the second value from the array.

    c.  Add the third value of the array with a value of 30 using “expr” and store it in the second

    name of the array and print the updated second value.

    d.  For each name in the array print the corresponding value using “forever” statement.

    TIME LINES OF THE ASSIGNMENT: The duration of the assignment is 1 week.

    DELIVERABLES FOR THE ASSIGNMENT: A document or an excel sheet describing your analysis, understanding and conclusions on the results

    EVALUATION CRITERIA: The assignment is evaluated for 10 marks.

    5 Marks are awarded for the quality of the assignment deliverables5 Marks are awarded for the your analysis and presentation

    SKILL MATRIX 

    Remember Understand Apply Analyze Evaluate Create

    Factual

    Knowledge

    Conceptual

    Knowledge

    Procedural

    Knowledge

    MetaCognitive

    Knowledge

  • 8/15/2019 LPS Assignments linux questions

    12/14

      IITM NPTEL Seer IESA Project

    Assignment - 9

    AIM OF THE ASSIGNMENT:

    Write Tcl script for the following scenario mentioned 

    ASSIGNMENT DESCRIPTION:

    a.  Write a Tcl script to find the sum of the arguments using the “args” keyword that are passed

    in a procedure block.

     b.  Read the user input, asking his/her name.

    c.  Ask a person his/her age .if it is under 18. Reply: “You are not eligible for Voting”. If it is 18

    or above, Reply: ”You are eligible for Voting”

    TIME LINES OF THE ASSIGNMENT: The duration of the assignment is 1 week.

    DELIVERABLES FOR THE ASSIGNMENT: A document or an excel sheet describing your analysis, understanding and conclusions on the results

    EVALUATION CRITERIA: The assignment is evaluated for 10 marks.5 Marks are awarded for the quality of the assignment deliverables5 Marks are awarded for the your analysis and presentation

    SKILL MATRIX 

    Remember Understand Apply Analyze Evaluate Create

    Factual

    Knowledge

    Conceptual

    Knowledge

    Procedural

    Knowledge

    MetaCognitive

    Knowledge

  • 8/15/2019 LPS Assignments linux questions

    13/14

      IITM NPTEL Seer IESA Project

    Assignment - 10

    AIM OF THE ASSIGNMENT:

    Write Python script for the following scenario

    ASSIGNMENT DESCRIPTION:

    a.  Using conditional statements in python, Write a program for authorization. ( User has to enter

    the name from the keyboard)

     b. 

    i.  Using „for‟ statement in python, display all the characters in the word : Condition 

    ii.  Using „range‟ function, display all the elements inside the following list :

    {„dog‟, „cat‟, „tiger‟, „rat‟}

    c.  To display all the prime numbers in the range 30-50 using python scripting.

    TIME LINES OF THE ASSIGNMENT: The duration of the assignment is 1 week.

    DELIVERABLES FOR THE ASSIGNMENT: A document or an excel sheet describing your analysis, understanding and conclusions on the results

    EVALUATION CRITERIA: The assignment is evaluated for 10 marks.5 Marks are awarded for the quality of the assignment deliverables

    5 Marks are awarded for the your analysis and presentation

  • 8/15/2019 LPS Assignments linux questions

    14/14

      IITM NPTEL Seer IESA Project

    SKILL MATRIX 

    Remember Understand Apply Analyze Evaluate Create

    Factual

    Knowledge

    Conceptual

    Knowledge

    Procedural

    Knowledge

    MetaCognitive

    Knowledge