My requirement is to convert pipe separated file into normal excel.
So I used the below tr command in UNIX to perform this operation.
tr '|' ',' < filename.csv > filename_Final.csv
when I executed the above command it brings the negative sign of the field to field end.
So I tried to bring the negative sign to front of the field I dint find correct matching UNIX script.
If anyone come across a similar instance, kindly help.
Input: Pipe file
1|abc|-123
2|def|456
3|ijk|789
After tr execution
tr '|' ',' < filename.csv > filename_Final.csv
Output:
Pipe file is bifurcated into normal columns
1 abc 123-
2 def 456
3 ijk 789
My requirement is to bring the negative sign to front of the field.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…