DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING MOTILAL NEHRU NATIONAL INSTITUTE OF TECHNOLOGY ASSIGNMENT -7 SUB: UNIX & Shell Programming

CLASS: B.TECH (IV SEM ) IT1

Q1. Merge and sort the contents of files a,b,c and display the sorted output and save the uniq contents in another file d.

Q2. Add two nos. given by command line arguments and if this two nos. are not given then show some error message.

Q3. Write Script to find out biggest number from given three nos. Nos are supplies as command line argument. Print error if sufficient arguments are not supplied.

Q4. Write a shell script which gets executed, it should display the message “good morning”/”good evening”/”good afternoon” depending upon the time the program got executed.

Q5. Write script to print contains of file from given line number to next given number of lines. For e.g. If we called this script as a.sh and run as $sh a.sh 5 5 myf , Here print contains of 'myf' file from line number 5 to next 5 line of that file.

Q6. Write a script that presents a multiple choice questions, get user answers and report back total no of corrects.

Q7. Write script, that receive an argument "one" ,"two" , "three" .if argument supplied is "one" then display in bold , if "two" then as Blink effect, display in reverse if it is "three" . for others display it in red color .using else-if statement and switch case .

Read all concepts clearly w.r.t to syntax, this is revised lab

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING MOTILAL NEHRU NATIONAL INSTITUTE OF TECHNOLOGY ASSIGNMENT -7 SUB: UNIX & Shell Programming

CLASS: B.TECH (IV SEM ) IT1

Q8. Write a Shell Script which creates the following menu and prompts for choice from user and runs the chosen command. Today's date Process of user List of files Quit to UNIX

Q9. Write a Shell Script that computes the factorial of a given number.

Q10. Write a Shell Script that changes the extension of a group of files from txt to doc

Q11. Calculate the smallest number and largest number among a set.

Q12. Write a Shell Script which will redirect the output of the date command without the time into a file.

Q13. Write a Shell Script which takes a command line argument of Kms and by default converts that number into meters. Also provide options to convert km to dm and km to cm.

Q14. WAP to calculate and print the first m Fibonacci numbers. Q15. WASS that will receive any number of filenames as arguments. The shell script should check whether such files already exist. If they do, then it should be reported. The files that do not exist should be created in a subdirectory called mydir. The shell script should first check whether the sub-directory mydir exists in the current directory. If it doesn’t exist, then it should be created. If mydir already exists, then it should be reported along with the number of files that are currently present in mydir.

Read all concepts clearly w.r.t to syntax, this is revised lab

Q1. Merge and sort the contents of files a,b,c and display the sorted ...

Write a shell script which gets executed, it should display the message “good morning”/”good evening”/”good afternoon” depending upon the time the program ...

15KB Sizes 1 Downloads 142 Views

Recommend Documents

Merge Sort - CS50 CDN
Data stored in memory has both a value and a location. • Pointers contain the memory address of some piece of data. • * pointer contains address to a ...

Merge Sort
On input of n elements: If n < 2. Return. Else. Sort left half of elements. Sort right half of elements. Merge sorted halves. Page 3. 3. 2. 5. 4. 6. 2. 5. 3. 4. 6. 1. 1. Page 4. Halve until each subarray is size 1. 4. 3. 2. 5. 4. 6. 2. 5. 3. 4. 6. 6.

Merge Sort - CS50 CDN
Data stored in memory has both a value and a location. • Pointers contain the memory address of some piece of data. • * pointer contains address to a ...

split and merge pdf files free online
Page 1 of 1. File: Split and merge pdf files free online. Download now. Click here if your download doesn't start automatically. Page 1 of 1. split and merge pdf files free online. split and merge pdf files free online. Open. Extract. Open with. Sign

Factors Affecting the Caffeine and Polyphenol Contents of Black and ...
tea liquor arise from the chemical components extracted from the leaf during tea preparation. A comprehensive study was therefore undertaken to determine the contributions of product and preparation variables on the total soluble solids, caffeine, an

Factors Affecting the Caffeine and Polyphenol Contents of Black and ...
The effects of product and preparation variables on the in-cup chemical composition of tea extracts is of interest because the appearance and taste characteristics and the possible health effects of a tea liquor arise from the chemical components ext

Method and apparatus for driving the display device, display system ...
Feb 5, 1998 - 345/100. AND DATA PROCESSING DEVICE. 5,604,511 A ... Foreign Application Priority Data. It is an object to .... DATA DRIVER. I l. 'IIII'IIIII'I IJ.

Q1) What are the advantages and disadvantages of thermal power ...
Instructions: • ANSWER NEATLY AND LEGIBLY on A4 sheets only and not in sheets torn from a book. • Sketch diagrams wherever relevant. Explain your notations explicitly and clearly. • An incomplete assignment is NOT acceptable for submission. •

Method and apparatus for driving the display device, display system ...
Feb 5, 1998 - 345/206. THE DISPLAY DEVICE, DISPLAY SYSTEM,. 5,251,051 A * 10/1993 Fujiiyoshi et a1. .. 345/100. AND DATA PROCESSING DEVICE.

pdf-12100\the-middling-sort-and-the-politics-of-social ...
... the apps below to open or edit this item. pdf-12100\the-middling-sort-and-the-politics-of-socia ... 640-renaissance-and-baroque-by-richard-dean-smith.pdf.

Late merge and phase-abst.pdf
UMass. Reinhart, T. 1976. The syntactic domain of anaphora. Ph.D. Thesis, MIT. Page 2 of 2. Late merge and phase-abst.pdf. Late merge and phase-abst.pdf.

pdf split and merge free
Loading… Page 1. Whoops! There was a problem loading more pages. Retrying... pdf split and merge free. pdf split and merge free. Open. Extract. Open with.

pdf-14103\the-demigod-files-percy-jackson-and-the-olympians ...
Try one of the apps below to open or edit this item. pdf-14103\the-demigod-files-percy-jackson-and-the-olympians-serieshardcover-on-february-01-2009.pdf.

The ABC of SEO
installed on Microsoft's Internet Explorer web browser. This shows .... send exclusively back to the homepage with another external page. This means ... click through traffic from other sites and if good anchor text is used this will be a plus point 

ABC of hypertension The pathophysiology of hypertension - The BMJ
dysfunction (as manifested by changes in endothelin and nitric oxide), low birth weight ..... Hughes AD, Schachter M. Hypertension and blood vessels. Br Med.

The Two-Pocket JetScanTM - Pro Sort
Software and currency upgrades are available through flashcard technology. Speed: 1,000 notes per minute ... Frequency is 50/60Hz. Customer must provide an electrical supply ... machine warranty or preventative maintenance agreement.).

Factors Affecting the Caffeine and Polyphenol Contents ...
native black tea preparation method is widely adopted. Here the drink is largely ..... The kinetics of the loose-leaf infusion system has been thoroughly inves-.

ABC of the First Year
A catalogue record for this book is available from the British Library ..... 2–4 ml/kg of 4.2% sodium bicarbonate solution slowly at a rate that does not exceed 2 ...

Juvenile infection and male display: testing the bright ...
Department of Biology, University of Maryland, College Park 20742, USA. Current tests of .... Egeth is now at Department of Psychology, University of Pennsylvania, ..... We thank the University of Maryland and the University Computer. Center ...

The ABC Approach and the Feminization of HIV/AIDS in ...
Sexual compliance is part of the social role and ... exchange sex for food, school fees, money and other commodities, often with men who are much older ...