/bash_scripting

Learning bash on ubuntu server

Primary LanguageShell

Bash Scripting on Ubuntu Server

Prerequisites

JSON file from: https://dummy.restapiexample.com/api/v1/employees

Deploy

Execute employees.sh file by using bash command

"bash employees.sh"

image

It will create the following text files

1.- Write the original json file of the given url in "original_file.json"

2.- Then from the same url and with jq, filters the top employee salary, greater than 300000 in "higher_salaries.txt"

3.- Using "original_file.json" write "even_ids.txt" with the even ID employees

4.- Also from "original_file.json" write a file with all employees with age under 30 in "under_30.txt"