You could do something like this - with file descriptors:
save the current output descriptor so we can restore it later
exec 3>&1
redirect the output stream to a process substitution that inserts the tab - for example
exec 1> >(paste /dev/null -)
From this point, any process that writes to standard output will have that output 'filtered' through the paste
command to insert tabs at the start.
When you're done, you can resume normal behavior by restoring the saved file descriptor and closing the temporary one
exec 1>&3 3>&-
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments