Premise: I am modifying my
.profile, and wanted to add a large ASCII text for "profile" generated by
figlet as comment to the beginning of the file.
I could do it in multiple steps, but I was trying to find a way to do it in the shortest steps possible.
figlet generates the large ascii text, and I append
# to the beginning of every line using
figlet -f slant "p r o f i l e" | sed -n 's/^.*/#&/p'
The output to the above:
# ____ _ __ # ____ _____ ____ / __/ (_) / / ___ # / __ \ / ___/ / __ \ / /_ / / / / / _ \ # / /_/ / / / / /_/ / / __/ / / / / / __/ # / .___/ /_/ \____/ /_/ /_/ /_/ \___/ #/_/
Now, I want to append this to the beginning of
I have tried till now, with:
But, I have not yet achieved the desired results, i.e, doing the entire process in a single line of commands.
I could definitely break it down into 2 lines and solve it, but isn't there any solution to achieve this in a single line?