Bash command are mainly supported MacOS, Linux. On Windows, you can use WSL, it’s easy to setup and can use full-featured.
Note: Terminal ZSH
- Apps: We have many applications such as cmder (Windows), iTerm2 (MacOs),… For me only, I usually WezTerm on MacOS and Linux
- Online: repl.it
Ctrl+C: interrupt current tasksCtrl+L: clear the screenTab: Autocomplete the commands / directories / file names / …Ctrl+Shift+V: pastes from clipboard.- For a long list:
Enterto continue read,qto quit Ctrl+A: Move cursor to beginning of the line
# run at oncecommand_1 && command_2#!/bin/bash tells your terminal to run the script with bash. There are also zsh, sh, fish,…Multi-column
Note
# using script: file.sh#!/bin/shecho 'some info'command_1command_2Note
# using script: file.sh# with arguments$file1 = $1wc $file1 # word count
# multiple input argsfor FILE1 in "$@"; do wc $FILE1doneNote
NAME="defaut" # default value! DON'T HAVE SPACE!!!# with flagswhile getopts n:f: option; do case "${option}" in n) NAME=${OPTARG};; f) FILE=${OPTARG};; esacdoneMulti-column
Note
# all files / folders containing 'abc'ls | grep -i abcNote
# find command lines containing 'abc'dpkg -l | grep -i abcNote
# search and extract a part of resultpip show numpypip show numpy | sed -n 's/Location: //p'# /usr/lib/python3/dist-packages