Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google site




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 09-19-2008
primp primp is offline
Registered User
 

Join Date: Mar 2008
Posts: 19
This is in response to the original question, you said to use "tr" to add newline but I can't seem to get "tabs" to also be added?

So I get an output with a single tab, and the rest are not tabbed.

Script:


Code:
#!/bin/sh

A='text1,text2,text3'

echo -e "Output: \n\t${A}" | tr , '\n'

Script Output:


Code:
Output:
        text1
text2
text3

Desired Output:


Code:
Output:
        text1
        text2
        text3