Create An Easy to Use Bash Script Repository Using GitHub

Channel:
Subscribers:
14,500
Published on ● Video Link: https://www.youtube.com/watch?v=8_SzKK7ibO0



Duration: 1:56
1,939 views
12


#Linux #Bash #Github

Full steps can be found at https://i12bretro.github.io/tutorials/0494.html

In this example I'll be setting up a GitHub repository to host bash files, using the GitHub URL Shortener to simplify the URLs and then running the scripts locally on a Debian based virtual machine
 
--------------------------------------------------------------------
Create the GitHub Repository
--------------------------------------------------------------------
   01. Create or log into your existing GitHub account
   02. Click the New button in the top left to create a new repository
   03. Give the repository a name ≫ Click the Create Repository button
 
--------------------------------------------------------------------
Creating a Sample Bash Script
--------------------------------------------------------------------
   01. Open a text editor
   02. Paste the following script into a new text document
         #!/bin/bash
         echo "hello, today is $(date '+%A'). You are running me as $(whoami)."
   03. Save the file as whoami.sh
   04. Back in the browser, click the uploading an existing file link
   05. Upload the whoami.sh file and give a brief description ≫ Click the Commit changes button
   06. Click on the newly uploaded file
   07. Click the Raw tab at the top right of the code
   08. Copy the URL for the raw code
   09. Open another browser tab and navigate to https://git.io
   10. Paste in the raw code URL from the clipboard ≫ Click Shorten
   11. Copy the shortened URL
 
--------------------------------------------------------------------
Executing the Sample Bash Script
--------------------------------------------------------------------
   01. Launch terminal and execute the bash file from GitHub by running the following command
         curl -L PastedShortenedURL | bash
 


### Connect with me and others ###
★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro







Tags:
How To
Tutorial
i12bretro
Linux
Bash
Script Repository
Github
IT Toolbox