Git Product home page Git Product logo

devops-bootcamp-bash-conditionals's Introduction

DevOps BootCamp: Bash Conditionals

Task 1

An unsorted list is passed to the script. Write a program that will output the sum of even numbers

Check

./cond1.sh "1,2,3,4,5,6,7"

12

./cond1.sh "4,3,1"

4

./cond1.sh "2,2,9,3,8"

12

./cond1.sh ""

0

Task 2

Develop a script that takes the temperature value in Celsius OR Kelvins and returns the inverse value. The formula is pretty simple: C = K - 273; K = C + 273

Check

./temp.sh 55C

328K

./temp.sh 122K

-151C

./temp.sh 98C

371K

Task 3

Develop script that takes any string and calculate count of letters, numbers, symbols *!@#$%^&()_+ inside except whitespaces

Check

./check_string.sh 'Hello !! ** 564gfhf'

Numbers: 3 Symbols: 4 Letters: 9

./check_string.sh 'Hello !! +'

Numbers: 0 Symbols: 3 Letters: 5

./check_string.sh 'Hello !!+'

Numbers: 0 Symbols: 3 Letters: 5

devops-bootcamp-bash-conditionals's People

Contributors

ravikpt avatar klmov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.