Sponsored Content
Full Discussion: Help with tr
Top Forums Shell Programming and Scripting Help with tr Post 302789299 by Yoda on Wednesday 3rd of April 2013 12:24:11 PM
Old 04-03-2013
Using awk program:
Code:
awk ' {
        A[++r] = $0
}
END {
        for (i = 1; i <= r; i++) {
                printf i == r ? A[i] : (A[i] "|")
        }
        printf "\n"
} ' file

 
All times are GMT -4. The time now is 09:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy