I am attempting to format the output of my unix ksh script. Currently looks like ...
FTP TO HR : Down
FTP FROM HR 4011a : Up
FTP FROM HR 4019a : Down
FTP FROM HR : Down
Would like the status to be aligned as follows:
FTP TO HR : Down
FTP FROM HR 4011a : Up
FTP FROM HR 4019a : Down
FTP FROM HR : Down
Current code is below, am stripping out the non-english part of the result:
print "\t${item} : \t\t${result}" | sed 's/ew//1' | sed 's/_SMFtoRAW//1' | sed 's/RAWtoSMF//1' | sed 's// /g'
Any sugestions would be greatly appreciated!!
Thank-you.
Thank-you for that suggestion. The first column all line up but still experiencing the same problem with the 2 column due to the different lengths of data stored in 1st column. Output below ...
FTP TO HR: Down
FTP FROM HR 4011a : Up
FTP FROM HR 4019a : Down
FTP FROM HR : Down
Ok, have just noticed text isn't appearing in post as expected ... first column is indentent as required. 2nd column also indented but by the same amount from the end of the first column, rather then all starting from the same point (ie: need it to be from character position 55 for example).