SlideShare ist ein Scribd-Unternehmen logo
1 von 3
I'm new to this and trying to find out how to write a few of these scripts in UNIX:
1. Enter a numeric grade number when prompted "Please enter your grade " and receive the
message "You got a(n) <grade>", where grade is the lettergrade you earned.
Anything below 60% - F
60%-69% - D
70%-79% - C
80%-89%- B
90%-100% - A
2. Continue a loop until the user types anything by "Y".
3. Display this month's calendar (look at cal), the current date, and some other date like 5-7-
2003 in the format May 7, 2013.
Thanks!
Solution
1)echo "Enter the percentage"
read per
echo " Percentage: " $per
if [ $per -le 59 ]
then
echo "you got grade <F>―
elif [ $per -ge 60 ]&&[$per -le 69]
then
echo “You got grade <D>―
elif [ $per -ge 70 ]&&[$per -le 79]
then
echo “You got grade <C>―
elif [ $per -ge 80 ]&&[$per -le 89]
then
echo “You got grade <B>―
elif [ $per -ge 90 ]&&[$per -le 100]
then
echo “You got grade <A>―
else
echo"enter correct value"
fi
2)echo"enter something"
read cha
while [ $cha -ne "y" ]
do
echo "you enter"$cha
read cha
done
3)
echo "this months calender is"
cal
echo "current date is$(date)"

Weitere ähnliche Inhalte

Mehr von patriciab30

ID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docx
ID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docxID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docx
ID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docxpatriciab30
 
I- Physical Properties- Color-- Clear Odor- Nail polish Yemover (corre.docx
I- Physical Properties- Color-- Clear Odor- Nail polish Yemover (corre.docxI- Physical Properties- Color-- Clear Odor- Nail polish Yemover (corre.docx
I- Physical Properties- Color-- Clear Odor- Nail polish Yemover (corre.docxpatriciab30
 
I- H low do you know when to name something as an ionic compound- 2- H.docx
I- H low do you know when to name something as an ionic compound- 2- H.docxI- H low do you know when to name something as an ionic compound- 2- H.docx
I- H low do you know when to name something as an ionic compound- 2- H.docxpatriciab30
 
I- Which type of star oscillates in brightness in a pattern in such a.docx
I- Which type of star oscillates in brightness in a pattern in such a.docxI- Which type of star oscillates in brightness in a pattern in such a.docx
I- Which type of star oscillates in brightness in a pattern in such a.docxpatriciab30
 
I- Describe the different bonds that exist between the different macro.docx
I- Describe the different bonds that exist between the different macro.docxI- Describe the different bonds that exist between the different macro.docx
I- Describe the different bonds that exist between the different macro.docxpatriciab30
 
I- Anole Company 25 POINTS Anole Company was incorporated as a new bus.docx
I- Anole Company 25 POINTS Anole Company was incorporated as a new bus.docxI- Anole Company 25 POINTS Anole Company was incorporated as a new bus.docx
I- Anole Company 25 POINTS Anole Company was incorporated as a new bus.docxpatriciab30
 
I) What are secondary bonding interactions (also called charge transfe.docx
I) What are secondary bonding interactions (also called charge transfe.docxI) What are secondary bonding interactions (also called charge transfe.docx
I) What are secondary bonding interactions (also called charge transfe.docxpatriciab30
 
I need to write a soil chemistry paper using scientific articles and j.docx
I need to write a soil chemistry paper using scientific articles and j.docxI need to write a soil chemistry paper using scientific articles and j.docx
I need to write a soil chemistry paper using scientific articles and j.docxpatriciab30
 
I need help with CH4- What is its intermolecular force- Question 4 of.docx
I need help with CH4- What is its intermolecular force- Question 4 of.docxI need help with CH4- What is its intermolecular force- Question 4 of.docx
I need help with CH4- What is its intermolecular force- Question 4 of.docxpatriciab30
 
I need help writing this program in MIPS MARS assembly language 2- Mak.docx
I need help writing this program in MIPS MARS assembly language 2- Mak.docxI need help writing this program in MIPS MARS assembly language 2- Mak.docx
I need help writing this program in MIPS MARS assembly language 2- Mak.docxpatriciab30
 
I need help writing a python 3 function- I need to write a function th.docx
I need help writing a python 3 function- I need to write a function th.docxI need help writing a python 3 function- I need to write a function th.docx
I need help writing a python 3 function- I need to write a function th.docxpatriciab30
 
I need help with my geotechnical engineering HW-- Can a soil have a lo.docx
I need help with my geotechnical engineering HW-- Can a soil have a lo.docxI need help with my geotechnical engineering HW-- Can a soil have a lo.docx
I need help with my geotechnical engineering HW-- Can a soil have a lo.docxpatriciab30
 
I need help m5 In the modern Respond to the following questions with s.docx
I need help m5 In the modern Respond to the following questions with s.docxI need help m5 In the modern Respond to the following questions with s.docx
I need help m5 In the modern Respond to the following questions with s.docxpatriciab30
 
I need help describing the two kinds of people who are responsible for.docx
I need help describing the two kinds of people who are responsible for.docxI need help describing the two kinds of people who are responsible for.docx
I need help describing the two kinds of people who are responsible for.docxpatriciab30
 
12- Your friend has high protein and sugar in her urine- She repeats t.docx
12- Your friend has high protein and sugar in her urine- She repeats t.docx12- Your friend has high protein and sugar in her urine- She repeats t.docx
12- Your friend has high protein and sugar in her urine- She repeats t.docxpatriciab30
 
12- Under which of the following circumstances is the principal-agent.docx
12- Under which of the following circumstances is the principal-agent.docx12- Under which of the following circumstances is the principal-agent.docx
12- Under which of the following circumstances is the principal-agent.docxpatriciab30
 
12- An Asteroid passes by Earth every 17 years- The asteroid orbits th.docx
12- An Asteroid passes by Earth every 17 years- The asteroid orbits th.docx12- An Asteroid passes by Earth every 17 years- The asteroid orbits th.docx
12- An Asteroid passes by Earth every 17 years- The asteroid orbits th.docxpatriciab30
 
11- What are the components of the user interface-SolutionNow a days t.docx
11- What are the components of the user interface-SolutionNow a days t.docx11- What are the components of the user interface-SolutionNow a days t.docx
11- What are the components of the user interface-SolutionNow a days t.docxpatriciab30
 
11- The employer payroll tax expense on employee wages that is paid fo.docx
11- The employer payroll tax expense on employee wages that is paid fo.docx11- The employer payroll tax expense on employee wages that is paid fo.docx
11- The employer payroll tax expense on employee wages that is paid fo.docxpatriciab30
 
110) When you create a form from two tables that have a one-to-many re.docx
110) When you create a form from two tables that have a one-to-many re.docx110) When you create a form from two tables that have a one-to-many re.docx
110) When you create a form from two tables that have a one-to-many re.docxpatriciab30
 

Mehr von patriciab30 (20)

ID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docx
ID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docxID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docx
ID-D Samei- -14- Which ofthe following should sever be evaporwedon-hpl.docx
 
I- Physical Properties- Color-- Clear Odor- Nail polish Yemover (corre.docx
I- Physical Properties- Color-- Clear Odor- Nail polish Yemover (corre.docxI- Physical Properties- Color-- Clear Odor- Nail polish Yemover (corre.docx
I- Physical Properties- Color-- Clear Odor- Nail polish Yemover (corre.docx
 
I- H low do you know when to name something as an ionic compound- 2- H.docx
I- H low do you know when to name something as an ionic compound- 2- H.docxI- H low do you know when to name something as an ionic compound- 2- H.docx
I- H low do you know when to name something as an ionic compound- 2- H.docx
 
I- Which type of star oscillates in brightness in a pattern in such a.docx
I- Which type of star oscillates in brightness in a pattern in such a.docxI- Which type of star oscillates in brightness in a pattern in such a.docx
I- Which type of star oscillates in brightness in a pattern in such a.docx
 
I- Describe the different bonds that exist between the different macro.docx
I- Describe the different bonds that exist between the different macro.docxI- Describe the different bonds that exist between the different macro.docx
I- Describe the different bonds that exist between the different macro.docx
 
I- Anole Company 25 POINTS Anole Company was incorporated as a new bus.docx
I- Anole Company 25 POINTS Anole Company was incorporated as a new bus.docxI- Anole Company 25 POINTS Anole Company was incorporated as a new bus.docx
I- Anole Company 25 POINTS Anole Company was incorporated as a new bus.docx
 
I) What are secondary bonding interactions (also called charge transfe.docx
I) What are secondary bonding interactions (also called charge transfe.docxI) What are secondary bonding interactions (also called charge transfe.docx
I) What are secondary bonding interactions (also called charge transfe.docx
 
I need to write a soil chemistry paper using scientific articles and j.docx
I need to write a soil chemistry paper using scientific articles and j.docxI need to write a soil chemistry paper using scientific articles and j.docx
I need to write a soil chemistry paper using scientific articles and j.docx
 
I need help with CH4- What is its intermolecular force- Question 4 of.docx
I need help with CH4- What is its intermolecular force- Question 4 of.docxI need help with CH4- What is its intermolecular force- Question 4 of.docx
I need help with CH4- What is its intermolecular force- Question 4 of.docx
 
I need help writing this program in MIPS MARS assembly language 2- Mak.docx
I need help writing this program in MIPS MARS assembly language 2- Mak.docxI need help writing this program in MIPS MARS assembly language 2- Mak.docx
I need help writing this program in MIPS MARS assembly language 2- Mak.docx
 
I need help writing a python 3 function- I need to write a function th.docx
I need help writing a python 3 function- I need to write a function th.docxI need help writing a python 3 function- I need to write a function th.docx
I need help writing a python 3 function- I need to write a function th.docx
 
I need help with my geotechnical engineering HW-- Can a soil have a lo.docx
I need help with my geotechnical engineering HW-- Can a soil have a lo.docxI need help with my geotechnical engineering HW-- Can a soil have a lo.docx
I need help with my geotechnical engineering HW-- Can a soil have a lo.docx
 
I need help m5 In the modern Respond to the following questions with s.docx
I need help m5 In the modern Respond to the following questions with s.docxI need help m5 In the modern Respond to the following questions with s.docx
I need help m5 In the modern Respond to the following questions with s.docx
 
I need help describing the two kinds of people who are responsible for.docx
I need help describing the two kinds of people who are responsible for.docxI need help describing the two kinds of people who are responsible for.docx
I need help describing the two kinds of people who are responsible for.docx
 
12- Your friend has high protein and sugar in her urine- She repeats t.docx
12- Your friend has high protein and sugar in her urine- She repeats t.docx12- Your friend has high protein and sugar in her urine- She repeats t.docx
12- Your friend has high protein and sugar in her urine- She repeats t.docx
 
12- Under which of the following circumstances is the principal-agent.docx
12- Under which of the following circumstances is the principal-agent.docx12- Under which of the following circumstances is the principal-agent.docx
12- Under which of the following circumstances is the principal-agent.docx
 
12- An Asteroid passes by Earth every 17 years- The asteroid orbits th.docx
12- An Asteroid passes by Earth every 17 years- The asteroid orbits th.docx12- An Asteroid passes by Earth every 17 years- The asteroid orbits th.docx
12- An Asteroid passes by Earth every 17 years- The asteroid orbits th.docx
 
11- What are the components of the user interface-SolutionNow a days t.docx
11- What are the components of the user interface-SolutionNow a days t.docx11- What are the components of the user interface-SolutionNow a days t.docx
11- What are the components of the user interface-SolutionNow a days t.docx
 
11- The employer payroll tax expense on employee wages that is paid fo.docx
11- The employer payroll tax expense on employee wages that is paid fo.docx11- The employer payroll tax expense on employee wages that is paid fo.docx
11- The employer payroll tax expense on employee wages that is paid fo.docx
 
110) When you create a form from two tables that have a one-to-many re.docx
110) When you create a form from two tables that have a one-to-many re.docx110) When you create a form from two tables that have a one-to-many re.docx
110) When you create a form from two tables that have a one-to-many re.docx
 

Kürzlich hochgeladen

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 

Kürzlich hochgeladen (20)

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 

I-'m new to this and trying to find out how to write a few of these sc.docx

  • 1. I'm new to this and trying to find out how to write a few of these scripts in UNIX: 1. Enter a numeric grade number when prompted "Please enter your grade " and receive the message "You got a(n) <grade>", where grade is the lettergrade you earned. Anything below 60% - F 60%-69% - D 70%-79% - C 80%-89%- B 90%-100% - A 2. Continue a loop until the user types anything by "Y". 3. Display this month's calendar (look at cal), the current date, and some other date like 5-7- 2003 in the format May 7, 2013. Thanks! Solution 1)echo "Enter the percentage" read per echo " Percentage: " $per if [ $per -le 59 ] then echo "you got grade <F>―
  • 2. elif [ $per -ge 60 ]&&[$per -le 69] then echo “You got grade <D>― elif [ $per -ge 70 ]&&[$per -le 79] then echo “You got grade <C>― elif [ $per -ge 80 ]&&[$per -le 89] then echo “You got grade <B>― elif [ $per -ge 90 ]&&[$per -le 100] then echo “You got grade <A>― else echo"enter correct value" fi 2)echo"enter something" read cha while [ $cha -ne "y" ] do echo "you enter"$cha read cha done 3)
  • 3. echo "this months calender is" cal echo "current date is$(date)"