/my_bash_scripts

My bash scripting trainings

Primary LanguageShell

my_bash_scripts

My scripting trainings & useful snippets

Bash basics

echo
until
Bash variables
for loop
for
redirect output to file
Looping and skipping
Looping with numbers
conditionals
conditionals
arithmetic
cut
head 2
tr
sort
uniq
paste
concatenate array with itself
count elements of an array
display an element of an array
filter an array
read array
remove first capital
slice array

Networking

DNS change
Download/upload file
Ping ok
Ping more
Ping more (extended)
ProtonVPN CLI fix leak protection connection
Rename interfaces to Debian9

Hardware

Battery state 1
Print temperature
Mount second SSD

System

Timedatectl ntp sync on
Debian?
Docker Enable autocompletion
Install Portainer
Package installed?
begin Ubuntu
Delete specific files
Del
Show zombies

Bash tricks

Stop echo from breaking the line
Bash quine
Short quine
Script without shebang
Brace expansion examples
Clock
Command staistics
trap

Other

Vim setup example
Clock in terminal
Current time
Weather by location name
print_command_before_run_it
BTC price
Show my userpic

Snippets

Elapsed time
SimpleHTTPServer
Case (switch) in Bash
Average
Date formats
Copy between servers
Counter
Execute command on condition
Wait
Years since 2000
Conditional test
Skilstak VM
Options
roll20
Find and replace
Cisco Anyconnect

Bash functions

Up
Count time
Count words
Assign var to command result

Footnotes

  1. Perl