Hello all,
I am attempting to write a bash script and I am having difficulty making the output look neat and organized. I could fall back on just using newlines, but I would much rather have output that was easy to read. For instance, when I run git clone ...
, I want to first echo "Cloning repository" and then have the output of git
indented. Example output:
Cloning repository...
Initialized empty Git repository in /root/client_scripts/jojo/.git/
remote: Counting objects: 130, done.
remote: Compressing objects: 100% (121/121), done.
remote: Total 130 (delta 13), reused 113 (delta 6)
Receiving objects: 100% (130/130), 176.07 KiB, done.
Resolving deltas: 100% (13/13), done.
Currently, it's all compressed with no indentation. Does anyone know how to do this? I attempted with sed
and awk
but it didn't seem to show any more output than just Initialized empty Git repository in /root/client_scripts/jojo/.git/
. I would greatly appreciate any comments.