I am using the following command line in Linux to save the content of my input file (txt file consisted of columns) as a spreadsheet:less input_file > out_put.csvmy output file is The problem is in the output spreadsheet; all the columns in the input file stuck together in one column of the output file (spreadsheet CSV).  How can I revise my simple code to make it more efficient to save my txt file as a tab delimited text and a spreadsheet.
Save file as Tab delimited text and spreadsheet
csv;spreadsheet
First of all, less is just a pager, it is a tool that lets you read files. What you're doing is exactly the same as copying input_file to out_put.csv (cp input_file out_put.csv). You're not changing the content in any way.So, to read it as a spreadsheet using, for example libreoffice, you would need to open your spreadsheet application, then open your input_file and use space as the column separator:        Now, if you really want to convert your file to comma separated values format (.csv), you would need to add commas. This command will replace all spaces with commas on each of your lines and save the output as output.csv:sed 's/  */,/g' input_file > output.csvThe command above is sed and here I am using its substitution operator. The general format is s/pattern/replacement/ which will replace pattern with replacement. The g at the end makes it replace all occurrences of the pattern on each line, without it, it would only replace the first. The pattern I gave it was  (a space) followed by 0 or more (that's what * means) spaces (*) and I told it to replace with ,. This basically means replace any occurrences of one or more spaces with a comma.