├── README.md ├── box.sh ├── code-of-conduct.md └── contributing.md /README.md: -------------------------------------------------------------------------------- 1 | ```sh 2 | ┌──────────────────────────────────────────────┐ 3 | │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │ 4 | │ ░░░░ ╔═══╗ ░░░░░ AWESOME BASH COMMANDS ░░░░░ │ 5 | │ ░░░░ ╚═╦═╝ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │ 6 | │ ░░░ ╒══╩══╕ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │ 7 | │ ░░░ └────°┘ ░░ A curated list of awesome ░░░ │ 8 | │ ░░░░░░░░░░░░░░░░░ Bash useful commands ░░░░░ │ 9 | │ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │ 10 | └──────────────────────────────────────────────┘ 11 | ``` 12 | 13 | # Awesome Bash Commands [![](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) 14 | 15 | > A curated list of awesome [Bash](https://www.gnu.org/software/bash/) useful commands. Inspired by [awesome-shell](https://github.com/alebcay/awesome-shell) and [bash-handbook](https://github.com/denysdovhan/bash-handbook). 16 | 17 | ## Table of Contents 18 | - [Files and directories](#files-and-directories) 19 | - [Paths](#paths) 20 | - [Devices](#devices) 21 | - [Users and Groups](#users-and-groups) 22 | - [Date & Time](#date--time) 23 | - [Network](#network) 24 | - [Miscellaneous](#miscellaneous) 25 | - [Other Awesome Lists](#other-awesome-lists) 26 | 27 | ### Files and directories 28 | 29 | #### List files sorted by extension 30 | 31 | ```sh 32 | ls -l -X 33 | # Or 34 | ls -l --sort=extension 35 | ``` 36 | 37 | #### Count number of files within a directory 38 | 39 | ```sh 40 | ls -1 ./my-directory | wc -l 41 | ``` 42 | 43 | _Note: use `-a` to include also dot files._ 44 | 45 | #### Create a symbolic link for one directory or file 46 | 47 | ```sh 48 | ln -s /var/www/html ~/www 49 | ln -s ~/my/large/path/file.txt ~/myfile.txt 50 | ``` 51 | 52 | #### Change permissions for a symbolic link only 53 | 54 | ```sh 55 | chmod -h 770 ~/www 56 | chown -h www-data:www-data ~/www 57 | ``` 58 | 59 | #### Find octal permissions of one file or directory 60 | 61 | ```sh 62 | stat -c "%a %n" /var/www/html 63 | # 770 /var/www/html 64 | ``` 65 | 66 | #### Add sticky permissions to one directory and subdirectories 67 | 68 | ```sh 69 | find /var/www/html -type d -exec chmod g+s {} \ 70 | ``` 71 | 72 | _Note: Any new file created will have the same permissions as the root folder_ 73 | 74 | #### Create one empty file in current directory and subdirectories 75 | 76 | ```sh 77 | find ./my/current/directory -type d -exec touch {}/.gitignore \; 78 | ``` 79 | 80 | #### Delete one specific file of current directory and subdirectories 81 | 82 | ```sh 83 | find ./my/current/directory -name ".gitignore" -type f -delete 84 | ``` 85 | 86 | #### Delete all content of one directory but except one in specific 87 | 88 | ```sh 89 | find ./my-directory -mindepth 1 ! -regex '^./my-directory/data\(/.*\)?' -delete 90 | ``` 91 | 92 | #### Copy file content to clipboard 93 | Copy shell command output to clipboard 94 | 95 | ```sh 96 | cat myfile.txt | xclip -selection c 97 | ``` 98 | 99 | #### Copy entire directory to destination 100 | 101 | ```sh 102 | cp -avr /my/current/directory /destination/directory 103 | # Or 104 | rsync -av /my/current/directory /destination/directory 105 | ``` 106 | 107 | #### Copy entire directory files only to destination with exclude option 108 | 109 | ```sh 110 | rsync -har --progress --exclude .git /current/directory/. /destination/directory 111 | ``` 112 | 113 | #### Transfer an entire directory content to a remote destination 114 | 115 | __Note:__ It's necessary to setup a SSH connection. You can use a [SSH Config file](https://www.cyberciti.biz/faq/create-ssh-config-file-on-linux-unix/). 116 | 117 | ```sh 118 | rsync -hrtpluz --progress --stats my-current-directory/. my-remote-server:/var/data/my-remote-dir 119 | ``` 120 | 121 | Options used above: 122 | 123 | ```sh 124 | -h, output numbers in a human-readable format 125 | -r recurse into directories 126 | -t, --times preserve modification times 127 | -p, --perms preserve permissions 128 | -l, --links copy symlinks as symlinks 129 | -u, --update skip files that are newer on the receiver 130 | -z, --compress compress file data during the transfer 131 | --progress show progress during transfer 132 | --stats give some file-transfer stats 133 | ``` 134 | 135 | #### Show the space usage of file or directory 136 | 137 | Show the space usage of file or directory (recursive) in human readable format. 138 | 139 | ```sh 140 | du -sh /var/log/dnf.librepo.log 141 | # 4,1M /var/log/dnf.librepo.log 142 | 143 | du -sh /var/log 144 | # 2,2G /var/log 145 | ``` 146 | 147 | #### Show size of one symbolic link (file or directory) 148 | 149 | ```sh 150 | du -Hsh $(which dart) 151 | # 21M /usr/local/bin/dart 152 | ``` 153 | 154 | #### Show space usage of directories and files ordered by size 155 | 156 | ```sh 157 | du -sh /var/data/software/app/* | sort -rh 158 | # 1.1G /var/data/software/app/backups 159 | # 223M /var/data/software/app/logs 160 | # 125M /var/data/software/app/attachments 161 | # 70M /var/data/software/app/recovery 162 | # 1.2M /var/data/software/app/shared-home 163 | # 592K /var/data/software/app/viewfile 164 | # 12K /var/data/software/app/journal 165 | # 4.0K /var/data/software/app/bundled-plugins 166 | # 0 /var/data/software/app/lock 167 | ``` 168 | 169 | #### Show top ten of biggest directories 170 | 171 | ```sh 172 | du -hS /home/user/some/directory | sort -rh | head -10 173 | # 90G /home/user/some/directory/big-dir 174 | # 10G /home/user/some/directory/subdir/another-big-dir 175 | # ... 176 | ``` 177 | 178 | #### Delete all files in directory by pattern 179 | 180 | ```sh 181 | find /usr/local/apache/logs/archive/ -name '*2017.gz' -delete 182 | ``` 183 | 184 | #### Move files by pattern 185 | 186 | _This command move all `*.js` files into `*.ts` files (move equivalent)_ 187 | 188 | ```sh 189 | find src/ -type f -name "*.js" -exec bash -c 'mv {} `echo {} | sed -e "s/.js/.ts/g"`' \; 190 | ``` 191 | 192 | #### Compress files by pattern using tar and gzip 193 | 194 | Command bellow compress a group of files by pattern using tar and gzip compression into a new file like `FILE_NAME.tar.gz`. 195 | No sorting guaranteed. 196 | 197 | ```sh 198 | # Input files: 199 | # src/file1.log.01 200 | # src/file1.log.02 201 | # src/file1.log.03 202 | 203 | find src/ -type f -name "file1.log.*" -exec bash -c "tar cf - {} | gzip -9 > {}.tar.gz" \; 204 | 205 | # Or using find -exec 206 | 207 | find src/ -maxdepth 1 -type f -name "file1.log.*" -exec sh -c "tar cf - {} | gzip -9 > tarballs/{}.tar.gz && echo '{} (compressed)'" \; 208 | 209 | # Output files: 210 | # src/file1.log.01.tar.gz 211 | # src/file1.log.02.tar.gz 212 | # src/file1.log.03.tar.gz 213 | ``` 214 | 215 | #### Optimizing Tar/Gzip archive size by changing content files order 216 | 217 | ```sh 218 | find directory/* -print | rev | sort | rev | \ 219 | tar --create --no-recursion --files-from - | \ 220 | gzip -c > directory.tar.gz 221 | ``` 222 | 223 | Motivated by https://news.ycombinator.com/item?id=24221498 224 | 225 | **Alternative sorting in ascending way:** 226 | 227 | ```sh 228 | find . -type f -name "file1.log.*" | sort -n | xargs -I{} sh -c "tar cf - {} | gzip -9 > {}.tar.gz && echo '{} (compressed)'" \; 229 | ``` 230 | 231 | __Tip:__ Use `-maxdepth` flag in order to limit directory levels finding. 232 | 233 | #### Compress a directory using tar and gzip 234 | 235 | ```sh 236 | tar -zcvf my_dir.tar.gz my-dir/ 237 | ``` 238 | 239 | #### List content of a tar and gzip file without extracting it 240 | 241 | ```sh 242 | tar -tvf my_dir.tar.gz | less 243 | ``` 244 | 245 | #### Create a temporary directory with prefix 246 | 247 | ```sh 248 | mktemp -dt "my-prefix" 249 | ``` 250 | 251 | #### Clean temporary directory 252 | 253 | ```sh 254 | rm -rf /tmp/* /tmp/.* 255 | ``` 256 | 257 | #### Calculate gzip size of one no compressed file 258 | 259 | ```sh 260 | gzip -c FILENAME.txt | wc -c | awk '{ 261 | if ($1 > 1000 ^ 3) { 262 | print($1 / (1000 ^ 3)"G") 263 | } else if ($1 > 1000 ^ 2) { 264 | print($1 / (1000 ^ 2)"M") 265 | } else if ($1 > 1000) { 266 | print($1 / 1000"K") 267 | } else { 268 | print($1)"b" 269 | }}' 270 | 271 | # 560K 272 | ``` 273 | 274 | #### Split out a specific file into more small files by number of lines 275 | 276 | ```sh 277 | split -d -l 200000 ./big_file.log small_file.log. 278 | 279 | # Output files in current directory: 280 | # small_file.log.01 281 | # small_file.log.02 282 | # small_file.log.03 283 | # .... 284 | ``` 285 | 286 | _Notes:_ 287 | 288 | - `smallfile.log.` is a custom suffix for file names. 289 | - `200000` is a custom number of lines per file. 290 | 291 | #### Get only the number of lines of one specific file 292 | 293 | ```sh 294 | wc -l big_file.log | sed -E "s/([a-z\-\_\.]|[[:space:]]*)//g" 295 | 296 | # 9249133 297 | ``` 298 | 299 | ### Paths 300 | 301 | #### Show the full path of a command 302 | 303 | ```sh 304 | which bash 305 | # /usr/bin/bash 306 | 307 | which git node 308 | # /usr/bin/git 309 | # /usr/bin/node 310 | ``` 311 | 312 | #### Show the resolved path of a symbolic link 313 | 314 | ```sh 315 | realpath ~/www 316 | # /usr/share/nginx/html 317 | ``` 318 | 319 | #### Determine the current directory 320 | 321 | ```sh 322 | pwd 323 | # /home/my/current/directory 324 | ``` 325 | 326 | ### Devices 327 | 328 | #### Display file system disk space usage with total 329 | 330 | Show the file system disk space usage in human readable format. 331 | 332 | ```sh 333 | df -h --total 334 | # Filesystem Size Used Avail Use% Mounted on 335 | # devtmpfs 487M 0 487M 0% /dev 336 | # tmpfs 497M 0 497M 0% /dev/shm 337 | # tmpfs 497M 508K 496M 1% /run 338 | # tmpfs 497M 0 497M 0% /sys/fs/cgroup 339 | # /dev/vda1 30G 2.7G 26G 10% / 340 | # tmpfs 100M 0 100M 0% /run/user/0 341 | # total 2.2T 600G 100G 20% - 342 | ``` 343 | 344 | #### Display system memory information with total 345 | 346 | ```sh 347 | free -h --total 348 | # total used free shared buff/cache available 349 | # Mem: 200G 60G 100G 262M 30G 180G 350 | # Swap: 0B 0B 0B 351 | # Total: 200G 60G 100G 352 | ``` 353 | 354 | or 355 | 356 | ```sh 357 | cat /proc/meminfo 358 | # MemTotal: 183815530 kB 359 | # MemFree: 101918660 kB 360 | # MemAvailable: 123712410 kB 361 | # .... 362 | ``` 363 | 364 | _Tip: Pipe `grep` to filter your results. E.g `cat /proc/meminfo | grep MemTotal`_ 365 | 366 | #### Mount a FAT32 USB device 367 | 368 | ```sh 369 | mount -t vfat /dev/sdb1 /media/usb 370 | ``` 371 | 372 | #### Increase temporary directory size 373 | 374 | ```sh 375 | mount -o remount,size=5G /tmp/ 376 | ``` 377 | 378 | #### Find out a block device by label 379 | 380 | ```sh 381 | blkid --label MY_MICROSD 382 | # /dev/sdc1 383 | 384 | lsblk --output name,serial,uuid,partuuid,label,partlabel $(blkid --label MY_MICROSD) 385 | # NAME SERIAL UUID PARTUUID LABEL PARTLABEL 386 | # sdc1 4BGE-7510 ec123nba-02 MY_MICROSD 387 | ``` 388 | 389 | ### Users and Groups 390 | 391 | #### Switch user and execute command immediately 392 | 393 | ```sh 394 | sudo -Hu root fish 395 | ``` 396 | 397 | #### Add an existing user to existing group 398 | 399 | ```sh 400 | usermod -a -G ftp john 401 | ``` 402 | 403 | ### Date & Time 404 | 405 | #### Show extended ISO format Date ([ISO 8601](http://en.wikipedia.org/wiki/ISO_8601)) 406 | 407 | ```sh 408 | date "+%Y-%m-%dT%H:%m:%S" 409 | # 2018-09-13T10:09:26 410 | ``` 411 | 412 | ### Network 413 | 414 | #### Show current IP address 415 | 416 | ```sh 417 | ifconfig | awk '// { getline; print $2 }' 418 | # or 419 | ifconfig | grep -E "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d: | head -n1 420 | ``` 421 | 422 | ### Miscellaneous 423 | 424 | #### Show GNU/Linux distribution and operating system 425 | 426 | a) Using `hostnamectl`: 427 | 428 | ```sh 429 | hostnamectl | grep -E "(.+)(System|Kernel|Arch)(.+)" 430 | # Operating System: Arch Linux 431 | # Kernel: Linux 5.1.7-arch1-1-ARCH 432 | # Architecture: x86-64 433 | ``` 434 | 435 | b) Using `cat /etc/os-release`: 436 | 437 | ```sh 438 | cat /etc/os-release 439 | # NAME="Arch Linux" 440 | # PRETTY_NAME="Arch Linux" 441 | # ID=arch 442 | # BUILD_ID=rolling 443 | # ANSI_COLOR="0;36" 444 | # HOME_URL="https://www.archlinux.org/" 445 | # DOCUMENTATION_URL="https://wiki.archlinux.org/" 446 | # SUPPORT_URL="https://bbs.archlinux.org/" 447 | # BUG_REPORT_URL="https://bugs.archlinux.org/" 448 | # LOGO=archlinux 449 | ``` 450 | 451 | #### Generate random numbers 452 | 453 | a) 454 | 455 | ```sh 456 | od -vAn -N64 < /dev/urandom | tr '\n' ' ' | sed "s/ //g" | head -c 32 457 | # 03121617301002504516642404031105 458 | ``` 459 | 460 | b) 461 | 462 | ```sh 463 | env LC_CTYPE=C tr -dc "0-9" < /dev/urandom | head -c 32 | xargs 464 | # 50569696992247151969921987764342 465 | ``` 466 | 467 | _Change `head` value to truncate the result's length._ 468 | 469 | #### Generate random alphanumerics 470 | 471 | a) Alphanumeric only 472 | 473 | ```sh 474 | base64 /dev/urandom | tr -d '/+' | head -c 32 | xargs 475 | # 3udiq6F74alwcPwXzIDWSnjRYQXcxiyl 476 | ``` 477 | 478 | b) Alphanumeric with a custom chars set 479 | 480 | ```sh 481 | env LC_CTYPE=C tr -dc "A-Za-z0-9_!@#\$%^&*()-+=" < /dev/urandom | head -c 32 | xargs 482 | # yiMg^Cha=Zh$6Xh%zDQAyBH1SI6Po(&P 483 | ``` 484 | 485 | _Change `tr -dc` char set to get a custom result._ 486 | 487 | #### Generate a random hash 488 | 489 | ```sh 490 | od -vAn -N64 < /dev/urandom | tr '\n' ' ' | sed "s/ //g" | openssl dgst -sha256 | sed "s/-//g" 491 | # 7adf57e0a90b32ce0e1f446268dbd62b583c649a2e71a426519c6e9c0006b143 492 | ``` 493 | 494 | _Openssl digest algorithms supported: `md5`, `md4`, `md2`, `sha1`, `sha`, `sha224`, `sha256`, `sha384`, `sha512`, `mdc2` and `ripemd160`_ 495 | 496 | #### Generate a random UUID 497 | 498 | ```sh 499 | uuidgen | tr "[:lower:]" "[:upper:]" 500 | # D2DA7D0C-ABAA-4866-9C97-61791C9FEC89 501 | ``` 502 | 503 | #### Generate 1 million of unique random phone numbers 504 | This command generate one million of unique random phone numbers (random permutations) fast using GNU/Linux [shuf](https://www.gnu.org/software/coreutils/manual/html_node/shuf-invocation.html) command. 505 | Use `sed` command for customize each number format. For example for add some prefix or suffix. Remember `shuf` is not limited to numbers only. 506 | 507 | ```sh 508 | shuf -i 100000000-999999999 -n 1000000 | sed -e 's/^/51/' > gsm.txt 509 | ``` 510 | 511 | #### Download a file using Curl and get its stats 512 | 513 | These commands below downloads a file using Curl and get its download stats into a `curl-download-stats.log` file. 514 | Place the script content into a custom file `.sh` and run just it. 515 | 516 | ```sh 517 | #!/bin/bash 518 | 519 | curl -Skw "\ 520 | CURL download testing\n\ 521 | =====================\n\ 522 | URL: %{url_effective}\n\ 523 | Response code: %{response_code}\n\ 524 | Download size: %{size_download}B\n\ 525 | Download speed: %{speed_download}B/s\n\ 526 | Time connect: %{time_connect}s\n\ 527 | Time name lookup: %{time_namelookup}s\n\ 528 | Time pretransfer: %{time_pretransfer}\n\ 529 | Time start transfer: %{time_starttransfer}s\n\ 530 | Time redirect: %{time_redirect}s\n\ 531 | Time total: %{time_total}s\n" \ 532 | -Lo /dev/null --url \ 533 | https://ger.mirror.pkgbuild.com/iso/2020.02.01/archlinux-2020.02.01-x86_64.iso \ 534 | > curl-download-stats.log 535 | ``` 536 | 537 | __Notes:__ 538 | 539 | - For get the file into a location just replace `/dev/null` with the corresponding file path. 540 | - For customize the write-out format take a look at https://ec.haxx.se/usingcurl/usingcurl-verbose/usingcurl-writeout 541 | 542 | ### Other Awesome Lists 543 | - [awesome-shell](https://github.com/alebcay/awesome-shell) 544 | - [awesome-fish](https://github.com/jbucaran/awesome-fish) 545 | - [awesome-zsh](https://github.com/unixorn/awesome-zsh-plugins) 546 | 547 | ## Contributions 548 | Please check out [the contribution file](contributing.md). 549 | 550 | ## License 551 | 552 | [![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png)](http://creativecommons.org/publicdomain/zero/1.0/) 553 | 554 | To the extent possible under law, [José Luis Quintana](http://git.io/joseluisq) has waived all copyright and related or neighboring rights to this work. 555 | -------------------------------------------------------------------------------- /box.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "┌──────────────────────────────────────────────┐" 4 | sleep 0.1 5 | echo "│ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │" 6 | sleep 0.1 7 | echo "│ ░░░░ ╔═══╗ ░░░░░ AWESOME BASH COMMANDS ░░░░░ │" 8 | sleep 0.1 9 | echo "│ ░░░░ ╚═╦═╝ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │" 10 | sleep 0.1 11 | echo "│ ░░░ ╒══╩══╕ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │" 12 | sleep 0.1 13 | echo "│ ░░░ └────°┘ ░░ A curated list of awesome ░░░ │" 14 | sleep 0.1 15 | echo "│ ░░░░░░░░░░░░░░░░░ Bash useful commands ░░░░░ │" 16 | sleep 0.1 17 | echo "│ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │" 18 | sleep 0.1 19 | echo "└──────────────────────────────────────────────┘" 20 | sleep 0.1 21 | echo 22 | sleep 0.1 23 | echo "https://github.com/joseluisq/awesome-bash-commands" 24 | echo 25 | -------------------------------------------------------------------------------- /code-of-conduct.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | - Using welcoming and inclusive language 12 | - Being respectful of differing viewpoints and experiences 13 | - Gracefully accepting constructive criticism 14 | - Focusing on what is best for the community 15 | - Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | - The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | - Trolling, insulting/derogatory comments, and personal or political attacks 21 | - Public or private harassment 22 | - Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | - Other conduct which could reasonably be considered inappropriate in a professional setting 24 | - Our Responsibilities 25 | 26 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 27 | 28 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 29 | 30 | ## Scope 31 | 32 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 33 | 34 | ## Enforcement 35 | 36 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [joseluisq](admin). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 37 | 38 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 39 | 40 | ## Attribution 41 | 42 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4/](version). 43 | 44 | [admin]: https://git.io/joseluisq 45 | [homepage]: http://contributor-covenant.org/ 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /contributing.md: -------------------------------------------------------------------------------- 1 | # Contribution Guidelines 2 | 3 | Please note that this project is released with a [Contributor Code of Conduct](code-of-conduct.md). 4 | By participating in this project you agree to abide by its terms. 5 | 6 | - 7 | 8 | Ensure your pull request adheres to the following guidelines: 9 | 10 | - Search previous suggestions before making a new one, as yours may be a duplicate. 11 | - Suggested command should be related to _Bash Shell Scripting_ only. 12 | - Make an individual pull request for each suggestion. 13 | - Make sure that your command was tested before. 14 | - Additions should be added to the bottom of the relevant category. 15 | - Keep the title and description short and simple, but at the same time descriptive. 16 | - Use the following _Markdown_ format: 17 | 18 |
19 |   ### Category
20 | 
21 |   #### Command title...
22 | 
23 |   Command description... (optional)
24 | 
25 |   ```sh
26 |   # bash command...
27 |   ```
28 | 
29 |   _credits: [the author or source](URL)_ (optional)
30 |   
31 | 32 | - The _credits: ..._ sould be in _italic_ with author or source url (this is optional). 33 | - Don't mention `bash`, `shell`, `sh` or `scripting` in the _title_ or _description_ as it's implied. 34 | - Start the description with a capital and end with a full stop/period. 35 | - The pull request should have a useful title and include the output or relevant screenshots of your command results and why it should be included. 36 | - Check your spelling and grammar. 37 | - Make sure your text editor is set to remove trailing whitespace. 38 | - New categories, or improvements to the existing categorization are welcome. 39 | 40 | Thank you for your suggestions! 41 | 42 | ### Updating your PR 43 | 44 | A lot of times, making a PR adhere to the standards above can be difficult. If the maintainers notice anything that we'd like changed, we'll ask you to edit your PR before we merge it. If you're not sure how to do that, [here is a guide](https://github.com/RichardLitt/docs/blob/master/amending-a-commit-guide.md) on the different ways you can update your PR so that we can merge it. 45 | --------------------------------------------------------------------------------