التخطي إلى المحتوى الرئيسي

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

المشاركات الشائعة من هذه المدونة

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. पहेली  - गोल हूँ पर बॉल नहीं लाल हूँ पर सेब नहीं जो मुझे परेशान करें उसकी फिर खैर नहीं! जवाब   - प्याज ।

Draw a character sketch of the old General in the lesson, ‘The Enemy’

Question:  Draw a character sketch of the old General in the lesson, ‘The Enemy’.  [CBSE (AI) 2011] Answer:  General Takima, being the head of the Japanese army, was more concerned  about himself than the general people of his country. Dr Sadao was a surgeon. He  could be a boon for the wounded soldiers during the world war. But the General asked  him to stay back for himself only because he may require an operation any time. Thus,  he was a selfish man. It was said that he used to hit his wife. But he was a kind man  also. Though the General promised to get the POW killed he desisted from his plan.  It is also hoped that he forgot to send the assassins to wipe out the American soldier or  he was concerned with the security of the doctor and his family as the public knowledge  of POW could harm them. For the General, it was very important that no harm comes to  his surgeon. More Question According to Zitkala-Sa what does ‘eating by the formula’ mean? How did Zitkala-Sa’s first da