Skip to main content

Celsius to Fahrenheit Linux Shell Script [Bash Shell Script]

To create script file type command 'touch filename.sh'

To give executable persimmison run command 'chmod +x filename.sh'

To convert from celsius to fahrenheit we use formula F = (C*9/5)+32

For printing message on screen we use 'echo' command

To take input from the user we use 'read' command

Shell Script to Convert Celsius to Fahrenheit Temperature

            
#!/bin/bash

echo "Enter temperature in Celsius: "
read celsius
                
# formula to convert Celsius to Fahrenheit: F = (C * 9/5) + 32
fahrenheit=$(echo "scale=2;($celsius * 9/5) + 32" | bc)
                
echo "${celsius}°C is equal to ${fahrenheit}°F"
                
            
        

Save the Script and to run script open terminal change directory to the location of the time type command './filename.sh' press enter button to run the script

Popular posts from this blog

BHU Holiday List 2024 [PDF] and BHU Hospital Holiday Lis

BHU Holiday List 2024 and BHU Hospital OPD Holiday List All the Holiday List of BHU 2024 You can find in this post and I also attached the original PDF link of BHU Holiday list S No. Name of Holiday No. of Days Day of the Week Date 1. Makar Sankranti 1 Monday 15-01-2024 2. Republic Day 1 Friday 26-01-2024 3. University's Foundation Day and Basant Panhami 1 Wednesday 14-02-2024 4. Guru Ravidas's Birthday 1 Saturday 24-02-2024 5. Maha Shivaratri 1 Friday 08-03-2024

गोल हूँ पर बॉल नहीं लाल हूँ पर सेब नहीं जो मुझे परेशान करें उसकी फिर खैर नहीं! - Hindi Paheli With Answer

गोल हूँ पर बॉल नहीं लाल हूँ पर सेब नहीं जो मुझे परेशान करें उसकी फिर खैर नहीं! Hindi Paheliyan With Answer, Dimagi Hindi Paheli with Answer, New Hindi Paheliyan, Tough Hindi Paheli with Answer, New Collection of Hindi Paheliyan. पहेली  - गोल हूँ पर बॉल नहीं लाल हूँ पर सेब नहीं जो मुझे परेशान करें उसकी फिर खैर नहीं! जवाब   - प्याज ।

How does the hundredth tiger take its final revenge upon the Tiger King?

Question:  How does the hundredth tiger take its final revenge upon the Tiger King? [CBSE (F) 2010] Answer:  A few days after killing the hundredth tiger, the Maharaja gifted a wooden tiger to his son on his third birthday. A tiny splinter on the surface of the wooden tiger pierced the Maharaja’s right hand, leading to a sore followed by the Maharaja’s death. Hence, the hundredth tiger took its final revenge upon the Tiger King. More Question What made Jack realise that his custom of telling a story was turning futile? Do you think Jack shared an affinity with Roger Skunk? Explain Why does Jo want the wizard should hit the mommy? Does her stand reflect a child’s perspective on life? What is your choice? Draw the character sketch of Jack Roger Skunk’s mother hit the wizard on his head. Do you think it was right on her part to do so? Should the wizard hit Roger Skunk’s mother? How does Derry interpret the fairy tale ‘Beauty and the Beast’? What does he feel about himself? If you we