I'm running commands which I want to specifically group them by every command,
as shown in the example below. Tried printing with echo -e '| $line' but it only affects commands that output the text contained in the file.
Background
Originally I saw a video which showed terminal commands that were somewhat grouped using the '|' just like the sample below. Im trying to customize or make a function for my .bashrc/.bash_profile files so that all of the outputs will have a '|' character at the beginning of each line of the output.
Discussion is also found here. So likely I'll make a function for the STDERR and STDOUT (just like mentioned here).
Example
+>system:~/sample
| No command 'sample' found, did you mean:
| Command 'yample' from package 'yample' (universe)
| Command 'ample' from package 'ample' (universe)
| sample: command not found
+>system:~/sudo apt-get update
| [sudo] password for system:
| Ign http://dl.google.com stable InRelease
| Hit http://dl.google.com stable Release.gpg
| Ign http://security.ubuntu.com trusty-security InRelease
| yadda yadda ...
+>system:~/