IRA Unix SBQ 10 JAN 2022

HELLO DORAEMONS,

IN THIS BLOGPOST ,I HAVE SHARED THE RECENTLY ASKED UNIX/BASH QUESTION AND SOLUTION WHICH IS CERTAINLY USEFUL WHEN YOU WANT TO PRACTICE.HOPE THIS BLOG IS USEFUL TO YOU.

The details of courses available in a Coding

Bootcamp are stored in a file in the following

format. Fields in the file are separated by

bar"|"pipe symbol (1)


Course |Instructor |Price


Customers can subscribe to these courses using

three plans based on the course price. 

Write the Unix command to print the corresponding price

and subscription plan available for each course.

These are three subscription plans available for

customers:


• If the price of the course is 0, then it is in

"Free" plan.


• The course is in "Gold" plan if the price of

the course is less than 500 Rs.


• If the price of the course is greater than or

equal to 500 Rs, then the course is

in "Premium" plan.


In the output, display only the Course, Price and

Plan, where each field is separated by the "|" character.


Refer the example given below for more darity on

input and output format.


The file name input will be provided as command

line argument when the script containing your

command will run.

 You can use shell variables

(e.g. $0 $1,$2) whichever is applicable for your

requirement to provide the command line

argument.


Sample Input:


Course |Instructor |Price

Web Development|Tim| 749

Intro to Programming| John|450

Back-end Development|John|799

Machine Learning| Andrew|0


Output


Course|Price|Plan

Web Development|749|Premium

Intro to Programming|450|Gold

Back-end Development|799|Premium

Machine Learning|0| Free


SOLUTION FOR THIS VIDEO:

TCS IRA UNIX 2022 SOLUTION 10-JAN


HOPE THIS IS HELPFUL TO YOU GUYS.IF YOU LIKE MY WORK ,CONSIDER SUBSCRIBING TO MY CHANNEL AND FOLLOW MY BLOGPOST FOR MORE UPDATES.


0 Comentarios

Follow Me On Instagram