Giter Club home page Giter Club logo

bash-scripting's Introduction

bash-scripting

A shell script is a computer program designed to be run by the Unix shell, a command-line interpreter.

Topics:

  1. Hello Bash Scripting
  2. Redirect to file
  3. Comments
  4. Conditional Statements
  5. Loops
  6. Script input
  7. Script output
  8. how to send output from one script to another script
  9. String Processing
  10. Numbers and Arithmetic
  11. Declare Command
  12. Arrays
  13. Functions
  14. Files and Directories
  15. Send Email Via Script
  16. Curl in Scripts
  17. Professional Menus
  18. Wait for filesystem events and inotify
  19. Introduction to grep
  20. Introduction to awk
  21. Introduction to sed file. youtube link
  22. Debugging bash scripts

Source:

For more information:

Doc:

$#, $@ & $? Bash Built-in variables SHELL SCRIPT LINUX COMMANDS BASH I found the $#, $@ & $? bash built-in variables very useful since I knew linux and today I would like to share their usage. I hope that you don't mind if you already know.

Example:

file: test.sh

#! /bin/sh
echo '$#' $#
echo '$@' $@
echo '$?' $?

If you run the above script as

./test.sh 1 2 3

You get output:

$#  3
$@  1 2 3
$?  0

You passed 3 parameters to your script.

  1. $# = number of arguments. Answer is 3
  2. $@ = what parameters were passed. Answer is 1 2 3
  3. $? = was last command successful. Answer is 0 which means 'yes'

bash-scripting's People

Contributors

rakibulislam01 avatar

Watchers

 avatar  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.