Skip to content

Commit

Permalink
Padding characters with printf
Browse files Browse the repository at this point in the history
  • Loading branch information
JV-conseil committed Jan 26, 2024
1 parent 4e049a8 commit 651ebce
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ title: Bash
- [Extract a value from a file](#extract-a-value-from-a-file)
- [Read a JSON stream](#read-a-json-stream)
- [Create Symbolic Links πŸ”—](#create-symbolic-links-)
- [Padding characters with printf](#padding-characters-with-printf)
- [Tools for Shell Script Development βš™οΈ](#tools-for-shell-script-development-️)
- [Features πŸ”Ž](#features-)
- [Coding Guidelines, Style, Linter ✍️](#coding-guidelines-style-linter-️)
Expand Down Expand Up @@ -129,6 +130,12 @@ e.g.: `ln -s source_file symbolic_link`

_src πŸ‘‰ [Create Symbolic Links](https://linuxize.com/post/how-to-create-symbolic-links-in-linux-using-the-ln-command/#how-to-use-the-ln-command)_

## Padding characters with printf

`printf '%0.1s' "."{0..10}` will output `...........`

_src πŸ‘‰ [Padding characters in printf](https://stackoverflow.com/a/4410103/2477854) and [printf syntax](https://www.warp.dev/terminus/bash-printf)_

## Tools for Shell Script Development βš™οΈ

| <img src="https://timonwong.gallerycdn.vsassets.io/extensions/timonwong/shellcheck/0.29.4/1676233151659/Microsoft.VisualStudio.Services.Icons.Default" height="50" style="margin:.5rem"> | [ShellCheck](https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck)<br>Integrates [ShellCheck](https://github.com/koalaman/shellcheck) into VS Code, a linter for Shell scripts |
Expand Down

0 comments on commit 651ebce

Please sign in to comment.