Does anyone know where I can find a need a Unix or Perl script to convert .csv or .xls file into .text file? Thank you so much in advance. -Joydeep
I’m sorry.
At least my workstation with OS X 10.6.x has /usr/bin/read, but it doesn’t do what you suggest.
Well:
while read line; do
echo $line;
done < file.txt
That’s a bit overkill right? And it seems my /usr/bin/read does nothing in that context, so I don’t know what the heck it’s meant to do 
Reply from Sohron on Jan 1 at 12:12 PM
Hi,
From where in UNIX can I find this “read” command? It’s a shell builtin and cannot easily be used to read contents of text files to the terminal. I’d use “cat”, “more” or “less”… Perl can convert .xls files to text format.
Hi,
From where in UNIX can I find this “read” command? It’s a shell builtin and cannot easily be used to read contents of text files to the terminal. I’d use “cat”, “more” or “less”… Perl can convert .xls files to text format.
There is sscovert from GNU Office software for converting data of spreadsheets files
Hi,
Can you please elaborate your query with example . Because if you open any csv or .xls file in unix then it is normally text file.
So, how your input file looks and what will be the output file after parsing it.
regards
sandeep
ro: joydeep sarkar email@removed
To: sandeep gaur email@removed
Sent: Thursday, 27 December 2012 8:51 PM
Subject: [unixadmin-l] Script to Convert .csv and .xls to .Text File
Question from joydeep sarkar?on Dec 27 at 10:23 AM
Does anyone know where I can find a need a Unix or Perl script to convert .csv or .xls file into .text file?
Thank you so much in advance.
-Joydeep
? Reply to this email to post your response.
Hi,
“csv” is a text file and you can read content of these kind files
by “read” command in shell
“xls” can not read easily by shell script because its format is binary.
.csv are text files already. No need to convert anything here. Just rename the extension.
What makes an csv a csv is that the data is delineated by commas or some other separator such as a tab.
An xls is a proprietary binary format owned by Microsoft. To convert them, install a converter like xls2csv - A script that recodes a spreadsheet's charset and saves as CSV. - metacpan.org
The output will be a text file, with delimiters, and a csv extension.