* putlog just here to see in sample code what gets written to file "want" */Īnd in case your source text file doesn't have a delimiter and data is just written out positional with blanks then the following code version could deal with that. * read source file "want" into input buffer and replace the source file delimiter (tab?) with comma */ I'm trying to replicate this Linux process to run in batch to convert a text file into CSV on Windows and then into EXCEL - once I've got the CSV file then I'm happy to run EXCEL normally sed 's/ \ /,/g' ifile.txt > ofile.csv my input file is a list of directories and files via ls -Rl >ifile. * create source text file with delimiter '|' (tab or whatever in your real data) */įilesystem|GB blocks|Free|%Used|Iused|%Iused|Mounted on torrent do torrentcheck -t i > info.txt done Now I want to convert this txt file such that I get a csv file with two columns, namely Torrent file
0 Comments
Leave a Reply. |