tricky

process bar

with dot .

reference:

waiting bar with dot

another:

progress bar with ▎▌ ▊ ▉

another solution:

progress bar with [###----]

progress bar with |\|/

spinner

[!TIP|label:check more:]

Braille Patterns

[!NOTE|label:references:]

Braille 8 dot Cell Numbering

4-dots

UNICODE
ICON
HTML ENCODING
COMMENTS

28C4

⣄

378

28C6

⣆

2378

2847

⡇

1237

280F

⠏

1234

280B

⠋

124

2839

⠹

1456

28B8

⢸

4568

28F0

⣰

5678

28E0

⣠

678

4-dots

7-dots

UNICODE
ICON
HTML ENCODING
COMMENTS

28FE

⣾

2345678

28FD

⣽

1345678

28FB

⣻

1245678

28BF

⢿

1234568

287F

⡿

1234567

28DF

⣟

1234578

28EF

⣯

1234678

28F7

⣷

1235678

7-dots

1-dot

1-dot

others

bash script

with stdout

[!TIP|label:use case:]

with exitcode

save & restore screen

tput

  • clear

  • restore

echo

  • save

  • restore

terminfo escape sequences

tput

reset terminal

[!NOTE]

clear screen

show term

show terminal width

customized color output

Operation not permitted

[!NOTE|label:references:]

array

differences in bash parameter calls

[!NOTE🏷️thinking:] I got a issue with/without eval commands like:

  • the --exclude options are not passed correctly when using :

  • but it works when using eval :

[!TIP|label:tips:]

since fdOpt is a single string (containing multiple arguments), Bash treats it as one single argument when passed to fd. This leads to the following issues:

--exclude '*.png' is treated as one single argument, rather than two separate ones: --exclude and '*.png';

As a result, fd cannot correctly interpret the glob pattern and treats it as a literal string; Therefore, --exclude '*.png' does not actually exclude anything.

recommend using arrays to store multiple arguments and then pass them to the command.

details:

FORM
WORKS?
REASON

fd . ${fdOpt}

❌ No

${fdOpt} is a single string; arguments are not properly split

eval "fd . ${fdOpt}"

✅ Yes

Bash re-splits the command string before execution, but it’s risky

fd . "${fdArgs[@]}"

✅✅ Yes (Recommended)

Uses an argument array — most recommended, safe, and clean

METHOD
ARGUMENT PARSING
SAFETY
WILDCARD EXPANSION
RECOMMENDED USE CASE

$cmd

❌ Incorrect, treated as a single command

❌ Low

❌ No

Avoid using

eval "$cmd"

✅ Correctly splits arguments

⚠️ Low

✅ Yes

Quick testing or executing ad-hoc command strings

"${cmd[@]}"

✅ Correct and safe argument passing

✅ High

❌ No (no expansion)

Recommended for building command argument lists programmatically

wildcard expansion

METHOD
WILDCARD EXPANDED?
EXPLANATION

eval "echo *.txt"

✅ Yes

Shell expands the wildcard during evaluation

eval "echo '*.txt'"

❌ No

'*.txt' is a quoted string literal, not subject to expansion

"${arr[@]}"

❌ No

Arguments are passed as literal strings, no globbing applied

Last updated

Was this helpful?