python - Text File with Many Columns to Single Column -


i have script produces text file rectangle.txt 20 columns wide , 3000 rows long. columns column delimited, meaning each column divided comma character. rows new line delimited, meaning each row divided new line character.

i find single command transmutes rectangle.txt longline.txt, longline.txt text file 1 column wide , 60,000 rows long. thank you!

bash or python preferred. thank you!

if have tr:

tr "," "\n" < rectangle.txt > longline.txt 

Comments

Popular posts from this blog

Prolog - Listing -

orchardcms - change base url in local copy in Orchard CMS -

linear regression - Trying to get confidence/prediction intervals with `predict.lm` in R, but I keep getting an error regarding my dichotomous variable -