Hello, I am new. I looked around the forums but couldn't find anything specific with the problem i'm having.
Purpose: To translate all 'tabs' in the input to 'three spaces'.
Here is my script (so far):
input=`echo $* | tr '\t' ' '`
The problem I'm having: The translate utility seems to only replace the '\t' with the first character in the second string.
So let’s say I give the script this input:
Other things I have tried
input=`echo $* | tr '\t' '\ '`
input=`echo $* | tr '\t' '\ \ \ '`
input=`echo $* | tr '\t' '" "'`
Nothing has worked so far, rather frustrating.
If you have read this far, you will most likely continue reading this, please do.
Thank you for taking your time to read this. Although you may find my script
to be amateur, I have just started in the world of unix/linux.If you have a solution
an explanation of why my script didn't work and an explanation of how the fixed version
works would be most helpful. I hope I didn't post in the wrong thread, my apologies.