Bash

Bash

This topic about scripts written for the Bash command shell.
Dylan  Iqbal

Dylan Iqbal

1632116277

Linux Terminal for Beginners - Full Course

I've been receiving a lot of questions from new Linux users that want to learn the terminal and the command line.  One viewer recently asked me if there was one video of mine that he could watch to learn this stuff.  And I don't really have a video that is comprehensive and that is aimed for absolute beginner's to the terminal.  So I'm making that video now...

#linux #ubuntu #bash

 

Linux Terminal for Beginners - Full Course
Dylan  Iqbal

Dylan Iqbal

1632015229

Linux Command Line Course - Bash Command Line Tutorial

Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. First released in 1989, it has been used widely as the default login shell for most Linux distributions.
In this course you will learn how use bash command to accomplish various computer task.
Following Bash topics have been shown and elaborated properly.

⭐ Table of Contents ⭐
(0:00) Linux Command:  cal
(0:39) Linux Command:  date
(1:30) Linux Command:  pwd
(3:02) Linux Command:  exit
(3:05) Linux Command:  Navigate bash history using arrow keys
(6:27) Linux Command:  Navigate left and right using arrow keys
(7:17) Linux Command:  mkdir       
(9:55) Linux Command:  ls1
(11:45) Linux Command:  less
(18:44) Linux Command:  ls2
(22:53) Linux Command:  ls3
(25:06) Linux Command:  ls4 
(30:20) Linux Command:   ls5
(32:37) Linux Command:  ls6
(37:18) Linux Command:  rm1
(43:50) Linux Command:  Using cd to navigate to a directory using a relative path
(52:55) Linux Command:  Understanding complex relative paths using . and ..
(1:02:03) Linux Command:  cd2
(1:12:49) Linux Command:  cd3
(1:19:09) Linux Command:  cd4
(1:24:49) Linux Command:  mv
(1:30:21) Linux Command:  cd5
(1:34:56) Linux Command:  ln1
(1:39:27) Linux Command:  ln2
(1:52:57) Linux Command:  file     
(1:55:27) Linux Command:  cp2
(1:59:00) Linux Command:  cp1
(2:02:56) Linux Command:  Using echo to print simple strings
(2:05:44) Linux Command:  Using echo to display multi-line messages
(2:08:44) Linux Command:  Using echo to display messages with escape sequences
(2:16:15) Linux Command:  ls and cd
(2:23:15) Linux Command:  cat  
(2:28:28) Linux Command:  uniq
(2:31:40) Linux Command:  wc
(2:34:22) Linux Command:  grep
(2:37:27) Linux Command:  head and tail
(2:40:44) Linux Command:  Echo
(2:43:17) Linux Command:  Wildcard Expansion
(2:46:28) Linux Command:  pathname expansion
(2:48:13) Linux Command:  Tilde expansion
(2:49:46) Linux Command:  Arithmetic expansion
(2:56:04) Linux Command:  Brace expansion
(3:10:33) Linux Command:  Parameter expansion
(3:16:22) Linux Command:  Command substitution
(3:20:46) Linux Command:  Escape characters
(3:28:14) Linux Command:  Double quotes
(3:39:36) Linux Command:  Single Quotes

#linux #bash #developer

 

Linux Command Line Course - Bash Command Line Tutorial
Louis Jones

Louis Jones

1629732784

How to Create Your Own Bash Scripts to Automate Tasks on Your Computer

Bash is the command line shell that you encounter when you open the terminal on most Unix operating systems, like MacOS and Linux. Learn how to create your own bash scripts to automate tasks on your computer.

 

#linux #bash 

How to Create Your Own Bash Scripts to Automate Tasks on Your Computer
Moses  Jast

Moses Jast

1626398640

Increasing Productivity In The Command Line

In this video I go over 5 command line tips that I don’t think many know about that will increase your productivity. Specifically bash.

Like if you enjoyed the video, comment if you have any questions! Subscribe if you want to see more content like this.

Find me elsewhere:
Instagram: https://www.instagram.com/kamiyaa91/
Github: https://github.com/kamiyaa/

  1. pushd/popd
    You’re probably familiar with the cd command to change directories, and cd - to switch between 2 directories very quickly. Pushd/popd work very similar to that. It behaves similar to the back and forward feature in a web browser. Using pushd {destination}, we go to that path or destination. Using popd, we go back to our previous destination. This is really useful when you want to navigate around multiple different directories very quickly

  2. Keyboard Shortcuts
    Many of you probably know that bash has keyboard shortcuts. I’ll be honest though, many of them aren’t very useful. But there are 2 that I found to be very useful.
    The first one is Ctrl+r (and Ctrl+s), which allows you to reverse search through your command history. I found this to be very useful when I need to ssh into a machine on a daily basis or scp the same file over and over.
    The second one is Ctrl+u (and Ctrl+k), which clears all characters before the cursor. At first this might not sound very useful, but it can actually clear the input buffer for password prompt. Command line password prompts don’t show how many characters you’ve typed so when you mistype something, you have to hold down backspace until you think you’ve cleared everything. By using Ctrl+u, you save yourself the hassle of holding down backspace. A nice bonus is that this keyboard shortcut works in the browser as well. You can learn more about bash shortcuts here: https://www.ostechnix.com/list-useful-bash-keyboard-shortcuts/

  3. stdout/stderr redirection
    When a program is ran, the shell opens 2 files for the program to output to: stdout and stderr. stdout is usually where normal output goes and stderr is usually where errors go. This is really useful when you are debugging a command line tool. If you were to output to stdout, it would mess up the program’s UI. But if you were to redirect stdout to a file, the program’s UI would be gone. The solution to this is to output log messages or errors to stderr, then redirect stderr to a file so its outputs does not mess up the program’s UI.

  4. Quotations
    Unlike Python, single quotes ’ and double quotes " are different in the command line. Double quoted strings are parsed and evaluated whereas single quotes are not. So things like wildcards, variable expansion, command evaluation still work inside double quotes. This may not be what you want if you have files or urls with special characters in them. So use single quotes if you want to guarantee the shell does not do anything with the string.

  5. The man command and its categories
    The man command is a great tool to learn how a system works. It provides manuals on command, library functions, configuration files and many more. The most popular ones are category 1: commands and category 2/3: library functions. Another useful category is #5: Configuration files. It tells you exactly how a configuration file is formatted and where to place them. To specify the category you want simply add a number to the man command: man 3 printf

Music:
Imagine by lukrembo
Michikusa by PeriTune (Licensed under https://creativecommons.org/licenses/by/4.0/)

#productivity #command line #bash

Increasing Productivity In The Command Line
Franz  Becker

Franz Becker

1625859180

The Penultimate Web Developer’s Cheat Sheet

I am literally just going to combine a fair number of my Cheat Sheets in no particular order.

HTML

GIT

CSS

Bootstrap

Bash

Python

Create and execute a program

  1. Open up a terminal/cmd
  2. Create the program: nano/cat > nameProgram.py
  3. Write the program and save it
  4. python nameProgram.py

Basic Datatypes

Keywords

Operators

Basic Data Structures

  • List
  • Tuple
  • Set
  • Dictionary
  • Conditional branching
  • Loops
  • Function definition
  • Function call

JavaScript

TypeScript

React

Node

JQuery

Markdown

#cheatsheet #javascript #python #html #bash #developer’s

The Penultimate Web Developer’s Cheat Sheet
Jackson  Watson

Jackson Watson

1625660940

Practical Bash: Variables and For Loops in Scripts - Beyond Code Live 009

Using variables and loops we can write scripts that work on a large set of files without writing it all out by hand.

Beyond Code:
(Learn to Code in 15 Minutes a Day)
Bootcamp Playlist: https://www.youtube.com/playlist?list=PLxki0D-ilnqZfyo2dZe11ZNGP7RJxJcoA
Subscribe on YouTube: https://youtube.com/channel/UC2KJHARTj6KRpKzLU1sVxBA
Join on Facebook: https://fb.com/beyondcodebootcamp
Follow on Twitter: https://twitter.com/@_beyondcode

AJ’s Live Streams:
Watch on Twitch: https://twitch.tv/coolaj86
Watch on Facebook: https://facebook.com/coolaj86
Subscribe on YouTube: https://youtube.com/coolaj86

Health, Wealth, Commitment
(My Morning Shower Thoughts as a Daily Lifestyle Vlog)
Join on Facebook: https://www.facebook.com/groups/5406824179391158
Subscribe on YouTube: https://www.youtube.com/channel/UCbw2SbqD0OofAEVF_T61wCQ

#softwaredevelopment #softwareengineer #webdevelopment #webdeveloper

https://youtu.be/cp6KJKBZq50

#bash #practical bash #loops #scripts #variables and for loops in scripts #webdeveloper

Practical Bash: Variables and For Loops in Scripts - Beyond Code Live 009
Jackson  Watson

Jackson Watson

1625660880

Bash printf: don't use echo! Beyond Code Live 006.c

Rather than teaching you every tool, I try to teach just the best tools.
I was wrong to teach you echo, which is useless, when I could have taught you printf, which is very useful.
But tonight I’m correcting that great miscarriage of justice!

printf ‘’ [double arrow] ./filename.txt # create a file
printf ‘Hello World!\n’ [double greater than] ./filename.txt # Add the line ‘Hello, World!’
printf ‘%q’ ‘Hello World!’ # show acceptable escapes

Beyond Code:
(Learn to Code in 15 Minutes a Day)
Bootcamp Playlist: https://www.youtube.com/playlist?list=PLxki0D-ilnqZfyo2dZe11ZNGP7RJxJcoA
Subscribe on YouTube: https://youtube.com/channel/UC2KJHARTj6KRpKzLU1sVxBA
Join on Facebook: https://fb.com/beyondcodebootcamp
Follow on Twitter: https://twitter.com/@_beyondcode

AJ’s Live Streams:
Watch on Twitch: https://twitch.tv/coolaj86
Watch on Facebook: https://facebook.com/coolaj86
Subscribe on YouTube: https://youtube.com/coolaj86

Health, Wealth, Commitment
(My Morning Shower Thoughts as a Daily Lifestyle Vlog)
Join on Facebook: https://www.facebook.com/groups/5406824179391158
Subscribe on YouTube: https://www.youtube.com/channel/UCbw2SbqD0OofAEVF_T61wCQ

#softwaredevelopment #softwareengineer #webdevelopment #webdeveloper

#bash #softwareengineer #webdevelopment #bash printf #webdeveloper #echo

Bash printf: don't use echo! Beyond Code Live 006.c
Jackson  Watson

Jackson Watson

1625653560

How to Move and Copy Files in Bash - Beyond Code Live-X 006.b

Beyond Code:
(Learn to Code in 15 Minutes a Day)
Bootcamp Playlist: https://www.youtube.com/playlist?list=PLxki0D-ilnqZfyo2dZe11ZNGP7RJxJcoA
Subscribe on YouTube: https://youtube.com/channel/UC2KJHARTj6KRpKzLU1sVxBA
Join on Facebook: https://fb.com/beyondcodebootcamp
Follow on Twitter: https://twitter.com/@_beyondcode

AJ’s Live Streams:
Watch on Twitch: https://twitch.tv/coolaj86
Watch on Facebook: https://facebook.com/coolaj86
Subscribe on YouTube: https://youtube.com/coolaj86

Health, Wealth, Commitment
(My Morning Shower Thoughts as a Daily Lifestyle Vlog)
Join on Facebook: https://www.facebook.com/groups/5406824179391158
Subscribe on YouTube: https://www.youtube.com/channel/UCbw2SbqD0OofAEVF_T61wCQ

#bash #copy files #code #how to move and copy files in bash

How to Move and Copy Files in Bash - Beyond Code Live-X 006.b
Jackson  Watson

Jackson Watson

1625649840

How to create a Simple Website with Markdown and Bash - Beyond Code Live 008

Tonight we’re going to marry our Markdown, Bash, Domain, and Server skills into a simple website!

Digital Ocean ($100 or 60 days Free): https://m.do.co/c/18ec10e74dae
Name.com: https://www.name.com/referral/13d0ac

Live Stream:
Facebook: https://facebook.com/coolaj86
YouTube: https://youtube.com/coolaj86
Twitch: https://twitch.tv/coolaj86

Follow Beyond Code:(Learn to Code in 15 Minutes a Day)
Facebook: https://www.facebook.com/beyondcodebootcamp
YouTube: https://www.youtube.com/channel/UC2KJHARTj6KRpKzLU1sVxBA
Twitter: https://twitter.com/_beyondcode

Follow Health, Wealth, Commitment
(Daily Lifestyle Chat)
Facebook: https://www.facebook.com/groups/5406824179391158
YouTube: https://www.youtube.com/channel/UCbw2SbqD0OofAEVF_T61wCQ

Facebook: https://facebook.com/coolaj86
YouTube: https://youtube.com/coolaj86
Twitch: https://twitch.tv/coolaj86

#softwaredevelopment #softwareengineer #webdevelopment #webdeveloper

#markdown #bash #softwareengineer #webdevelopment #webdeveloper #simple website

How to create a Simple Website with Markdown and Bash - Beyond Code Live 008
Jackson  Watson

Jackson Watson

1625642460

Intro to the Shell: Bash, Fish, and Common Commands - Beyond Code Live 006

Commands that I use daily:

  • webi # install commands on Mac, Linux, and Windows
  • pwd # print working directory
  • mkdir -p # create multiple directories at once
  • rm -rf # forcefully delete files and directories forever
  • ls # list files
  • ll # list files in table form
  • pushd # push into a directory
  • popd # pop out of a directory
  • tree # list files in tree form
  • rg # search contents of files
  • fzf # search files by file name
  • echo ‘’ [double arrow] ./README.md # create a file
  • fish # the fish shell (for daily use)
  • bash # the bash shell (for scripting)
    Other notes:
  • Tab gives suggestions and auto-completes
  • Right Arrow auto-completes
  • Up and Down arrows cycle through history
  • Left and Right arrow move back and forth on the command line
  • Alt and Left (or Right) skips a word backwards or forwards
  • Enter runs a command

Follow Beyond Code:
(Learn to Code in 15 Minutes a Day)
Facebook: https://www.facebook.com/beyondcodebootcamp
YouTube: https://www.youtube.com/channel/UC2KJHARTj6KRpKzLU1sVxBA
Twitter: https://twitter.com/_beyondcode

Follow Health, Wealth, Commitment
(Daily Lifestyle Chat)
Facebook: https://www.facebook.com/groups/5406824179391158
YouTube: https://www.youtube.com/channel/UCbw2SbqD0OofAEVF_T61wCQ

All Live Streams go to my personal channel first:
Facebook: https://facebook.com/coolaj86
YouTube: https://youtube.com/coolaj86
Twitch: https://twitch.tv/coolaj86

#shell #bash #fish #common commands

Intro to the Shell: Bash, Fish, and Common Commands - Beyond Code Live 006
Jackson  Watson

Jackson Watson

1625619970

The How? & Why? of the Double Dash (--) Delimiter on macOS, Linux, bash

Well if it isn’t our old frenemy, the double dash delimiter.
One of those things you encounter now and then that can really make you want to pull your hair out, but is super easy to use and understand once you know.

Join Beyond Code Bootcamp:
https://beyondcodebootcamp.com

#macos #linux #bash #double dash

The How? & Why? of the Double Dash (--) Delimiter on macOS, Linux, bash

Using the date command in Bash, learn how to work with date and time

Date command is an external bash program that allows to set or display system date and time. It also provides several formatting options. Date command is installed in all Linux distros by default.
Type date command  in terminal which will display current date and time.
Change Linux System Date and Time
Using date command, system date, time and timezone can be modified and the change has to be synced with the hardware clock
Formatting Options
A good place to get the list of formatting options will be the man page.

#date command #date and time #bash

Using the date command in Bash, learn how to work with date and time

How to Create a Simple Bash Shell Script to Send Messages on Telegram

In this article, you will walk through the creation of a simple Bash shell script to send messages to Telegram messenger using the Curl command. Then you will use this script to send a notification on every ssh login into your server.

Create telegram bot

To send a message to Telegram group or channel, you should first create your own bot. Just open Telegram, find @BotFather and type

/start. Then follow instructions to create bot and get token to access the HTTP API.

#telegram #ssh #bash #linux #notifications #chatbot #backend #api

How to Create a Simple Bash Shell Script to Send Messages on Telegram
Luz  Runolfsson

Luz Runolfsson

1624354452

Raspberry Pi - Samples for Robotics, Node, Python, and Bash

raspberryPi

robotics

intent:

Currently designed to act as programmable sentry.

🔹 control	: RPI_0w using NodeJs server to access GPIO Python code
🔹 movement	: 4 MG995 Servos, 2 subMicro Grippers & HS55 Servos, PCA9685 I2C Controller
🔹 sensing	: RPI 2.1 Camera, Insiq Bluetooth Speaker, Microphone MI-305
🔹 travel	: Tamiya Track, Double Gearbox, 2 F130 DC Motors, L293D
🔹 added	: 10 mm color LED, USB mini microphone
🔹 power	: rechargeable TL-PB 10400 & TL-PB 5200 mAh Powerbanks

Explores various bare metal programming technologies. Future plans include:

▶️ completion of the I2C servo operation
▶️ VAC (Voice Activated Commands) for more autonomous response
▶️ simple AI NLP for generalized communication
▶️ ESA AstroPi SenseHat for environment detection

The descriptions below show the most recent developments first.


robot 3 / replaced Steppers with Servos

  • control: PCA9685 16 Channel 12-Bit PWM Servo Motor Driver
  • servos: (4) Servo Motor, PN: MG995
  • speaker: USB Bluetooth Speaker Insiq PN: 4326595940 🔹 (upgrades BT3500SLV)
  • servos: (2) Hitec subMicro Servo motor, PN: HS55 🔹 (upgrades HS300)
  • grippers: (2) Actobotics subMicro Gripper Kit, PN: 637104 🔹 (upgrades “A” Grippers)

The SketchUp 3D drawing required only new Flange & Gripper drawings. All the other components were accessible online.
robot_3_ISO


  • steppers: (4) Stepper Motor 28BYJ48 🔸 (later removed)

  • control: (4) ULN2003 Driver Board 🔸 (later removed)

The Steppers were compact, but required too many GPIO leads for a RPI 40 pin J8 form factor. Some website discussions implied that the RPI timing is not reliable enough for many I2C protocol calls.
robot_3_steppers


robot 2 / added camera, grippers

  • camera: RPi Camera v2.1 with 8 Megapixel & 1080p resolution, PN: 2.1
  • speaker: GearHead Bluetooth Speaker, PN: BT3500SLV
  • microphone: USB mini microphone, PN: MI-305
  • light: 10 mm color LED
  • battery: TPLink PowerBank 10400 mAh, PN: TP-PB10400 🔹 (upgrades 4 AA batteries)
  • grippers: (2) Actobotics Horizontal Gripper Kit “A”, PN: 637094
  • servos: (2) HiTec Servo motor, PN: HS300, with C24T or H25T spline

The Grippers and Speaker worked, but proved to be clunky.

robot_2

The LibreCad 2D CAD representation with BOM.

robot_2_CAD


robot 1 / travel control via SmartPhone

  • computer: RPi0WF 1.1 SOC with BCM2835 cpu
  • control: L293D Controller DriveShield
  • gearbox: Tamiya Double Motorized Gearbox, PN: 70168 with (2) F130 DC Motors
  • chassis: Tamiya Tracked Vehicle Chassis, PN: 70108-1500
  • battery: TPLink PowerBank 5200 mAh, PN: TP-PB5200 (for RPi)
  • battery: (4) AA batteries in case (for motors)

The RPi operates the L293D thru GPIO ports using Python PWM code signaled by a NodeJS server.

robot_1

software

raspberrypi

os base: Raspbian, Bash, Putty, WinSCP, GitHub…
python

control: Python & IDLE for DC motor PWM control
node

server: NodeJS, Express (JavaScript, HTML, CSS) for view
sketchup

drawing: LibreCad 2D CAD, Sketchup 3D

The L293D Controller pinout diagram.

L293D_Controller


xtra

github image viewer
stackoverflow github html discussion

HTML5 text folding
CSS&JS folding

markdown guide
collapsible markdown

Download Details:

Author: mamgeorge
Download Link: Download The Source Code
Official Website: https://github.com/mamgeorge/raspberryPi

#node #raspberry-pi #python #bash

Raspberry Pi - Samples for Robotics, Node, Python, and Bash

Process JSON in Bash with Jq on The Command Line

The JSON (JavaScript Object Notation) format is widely used to represent data structures and is frequently used to exchange data between different layers of an application. We probably know how to interact with JSON-formatted data with the most used programming languages such as parsing JSON with python, but what if we need to interact with it from the command line, or in a bash script?

In this tutorial, we will see how we can accomplish such a task by using the jq utility and we will learn its basic usage.
Each data value has a text string called a “name” or “key.”. Together, they’re known as name: value pairs, or key: value pairs. A colon (:) separates a key from its value.

An “object” is a collection of key: value pairs. In a JSON file, an object begins with an open curly brace ({) and ends with a closing brace (}). JSON also supports “arrays,” which are ordered lists of values. An array begins with an opening bracket ([) and ends with a closing one (]).

Watch Complete Video for Full Understanding

#json #bash #linux

Process JSON in Bash with Jq on The Command Line