Code Monkey home page Code Monkey logo

basic-bash's Introduction

Basic-BASH

BASH practice over time

Using Learning the bash Shell, 3rd edition as basis for exercises, also doing own implementations

Contents

albumcounter.sh

Reads input file, orders input file lines in reverse numerical order and prints n lines to the screen using user input or default value.

bracketcomparison

uses [ condition ] to show how they work in general compares strings and if a file actually exists

Contains albumscript.sh and albumcounter files give albumcounter as argument for albumscript.sh

cutdata.sh

Cuts a column from a file with multiple columns of data randomdata contains the data cutdata.sh uses

echovariables

Demonstrates that variables inside functions are not global to the whole script Give data such as aa bb cc dd when running the script

fileselector

Selects files that match a given argument such as a specific month

imageformat.sh

Changes image format from jpg to jpeg To run again manually change from jpeg back to jpg Uses images.jpg

nullstringconditiontests

checks if a string is null using -n, ! -n, -z and ! -z operations

overvariables

Demonstrates that {} are necessary wrappers for shell variables in following scenarios: variable number is >= 10 or when wanting to add lets say character _ or a longer string after a specific variable.

screenerecho.sh

Showcases how to join different variables together and how to cut specific parts from a variable

servicestatusgrep

Checks if a service is running or not accepts service name as $1 argument

stringconditiontests

compares two strings using =, != operations

tracedir

Taken from Learning the bash shell, 3rd edition Navigates inside further directories and prints said directories

whoisloggedin.sh

Retrieves users that are logged in and tries to send them a message up to logged in terminal number 6.

basic-bash's People

Watchers

James Cloos avatar Sami Nieminen 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.