Skip to content

peter-c0de/bash-aliases

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

bash-aliases

Steps:

  1. Add the following code to the .bashrc in the home directory
### My Aliases ###

# Github Token:
github_password="password1234"
alias ghp='echo $github_code'

# Testing Parameters/Arguments
echoTest(){ echo $1 $2 $3; }

# Download YT Mp3:
downloadMp3(){ yt-dlp -x --audio-format mp3 $1; }

# Download YT Mp4:
downloadMp4(){ yt-dlp --format mp4 $1; 

# Merge MP4 with New Mp3:
# Requirements: ffmpeg
mergeMp4Mp3(){ ffmpeg -i $1 -i $2 -map 0:v -map 1:a -c:v copy -shortest $3; }

# PDF to PNGs:
# Requirements: imagemagick, poppler-utils, pdftoppm
pdf2png(){ pdftoppm -png $1 png; }
  1. Re-run the .bashrc

Filename: .bashrc

To run: .

$ cd~
$ . .bashrc

Links:

https://linuxize.com/post/how-to-create-bash-aliases/

https://opensource.com/article/19/7/bash-aliases

https://stackoverflow.com/questions/7131670/make-a-bash-alias-that-takes-a-parameter

https://askubuntu.com/questions/17536/how-do-i-create-a-permanent-bash-alias

https://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-5.html

About

Useful aliases for bash

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages